Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[usage] Configure ingress for Stripe webhook #11866

Merged
merged 3 commits into from
Aug 4, 2022

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Aug 4, 2022

Description

Configures ingress between proxy and the public API server to allow external access to the Stripe webhook (added in #11806).

  • Add a new backend section to the payment-ingress section in the proxy Caddyfile and
  • Update a networkpolicy to allow proxy to reach the public-api-server.

Related Issue(s)

Part of #10937

How to test

  • Hit the webhook handler using its external URL:
brew install httpie
http POST https://payment.af-ingressf994192aa3.preview.gitpod-dev.com/stripe/invoices/webhook type=foo

Expected output:

HTTP/1.1 200 OK
Content-Length: 15
Content-Type: text/plain; charset=utf-8
Date: Thu, 04 Aug 2022 08:05:21 GMT
X-Gitpod-Region: local.

event type: foo

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-ingress-for-stripe-webhook.10 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat added size/M and removed size/S labels Aug 4, 2022
@andrew-farries andrew-farries marked this pull request as ready for review August 4, 2022 08:50
@andrew-farries andrew-farries requested review from a team August 4, 2022 08:50
@github-actions github-actions bot added team: delivery Issue belongs to the self-hosted team team: webapp Issue belongs to the WebApp team labels Aug 4, 2022
Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

/hold
for Q about generated file

@@ -1424,8 +1424,7 @@ data:
"gcloud": {
"credentialsFile": "",
"region": "",
"projectId": "",
"maximumBackupCount": 0
"projectId": ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to your change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. The file was regenerated with make generateRenderTests following the README.

I don't know what accounts for the changes in the file besides the change to the proxy config. Maybe the file was not updated by a previous PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess Self-Hosted is on the review and can clarify. Perhaps we're missing a CI check that would fail if the output.golden doesn't match anymore.

Copy link
Contributor

@mrsimonemms mrsimonemms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good and happy to approve. We've just had a change merged which updated the render golden files so probably worth rebasing (again) as it's likely to fail when merged to main.

Remove the hold at will

/hold

@andrew-farries
Copy link
Contributor Author

Rebased and tests pass so

/unhold

@roboquat roboquat merged commit 7bbd9cf into main Aug 4, 2022
@roboquat roboquat deleted the af/ingress-for-stripe-webhook branch August 4, 2022 10:01
@roboquat roboquat added the deployed: webapp Meta team change is running in production label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production release-note-none size/M team: delivery Issue belongs to the self-hosted team team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants