Skip to content

[usage] Configure ingress for Stripe webhook #11866

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

Merged
merged 3 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions install/installer/cmd/testdata/render/minimal/output.golden
Original file line number Diff line number Diff line change
Expand Up @@ -1969,7 +1969,7 @@ data:
to openvsx-proxy.default.svc.cluster.local:8080
}
}
vhost.payment-endpoint: |-
vhost.payment-endpoint: |
https://payment.minimal-test.gitpod.com {
import enable_log
import remove_server_header
Expand All @@ -1981,6 +1981,14 @@ data:
import upstream_connection
}

@backend path /stripe/invoices/webhook
handle @backend {
reverse_proxy public-api-server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:9002 {
import upstream_headers
import upstream_connection
}
}

handle_errors {
respond "Internal Server Error" 500
}
Expand Down Expand Up @@ -8505,7 +8513,7 @@ spec:
template:
metadata:
annotations:
gitpod.io/checksum_config: 376f6713002e46d8ebff894855ecd010de87d856d5c4c412c2a2649847f2017a
gitpod.io/checksum_config: 926e623fd161e557fe9ebb5f2dc7f2e31ed391fb5a3fb1308cefc8b76945401a
creationTimestamp: null
labels:
app: gitpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ https://payment.{{.Domain}} {
import upstream_connection
}

@backend path /stripe/invoices/webhook
handle @backend {
reverse_proxy public-api-server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:9002 {
import upstream_headers
import upstream_connection
}
}

handle_errors {
respond "Internal Server Error" 500
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ func networkpolicy(ctx *common.RenderContext) ([]runtime.Object, error) {
Protocol: common.TCPProtocol,
Port: &intstr.IntOrString{IntVal: GRPCContainerPort},
},
{
Protocol: common.TCPProtocol,
Port: &intstr.IntOrString{IntVal: HTTPContainerPort},
},
},
From: []networkingv1.NetworkPolicyPeer{
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ func TestNetworkPolicy(t *testing.T) {
Protocol: common.TCPProtocol,
Port: &intstr.IntOrString{IntVal: GRPCContainerPort},
},
{
Protocol: common.TCPProtocol,
Port: &intstr.IntOrString{IntVal: HTTPContainerPort},
},
},
From: []networkingv1.NetworkPolicyPeer{
{
Expand Down