-
Notifications
You must be signed in to change notification settings - Fork 491
feat(kong): add additionalProxies support for multiple proxy services #1493
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
9e38666
dc45336
78da109
fac8b23
a01e739
eb3eb8f
3580a47
e834aaa
ab0b869
42d9868
b6e1fee
ac3f499
7839ba2
b3cb7af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Test additional proxy services feature | ||
| # This creates a second proxy service (ClusterIP) alongside the primary proxy (LoadBalancer) | ||
| # simulating the use case of external LB with proxy_protocol + internal ClusterIP without proxy_protocol | ||
|
|
||
| proxy: | ||
| enabled: true | ||
| type: LoadBalancer | ||
| annotations: | ||
| service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*" | ||
| http: | ||
| enabled: true | ||
| servicePort: 80 | ||
| containerPort: 8000 | ||
| parameters: | ||
| - proxy_protocol | ||
| tls: | ||
| enabled: true | ||
| servicePort: 443 | ||
| containerPort: 8443 | ||
| parameters: | ||
| - http2 | ||
| - proxy_protocol | ||
|
|
||
| additionalProxies: | ||
| internal: | ||
| enabled: true | ||
| type: ClusterIP | ||
| annotations: {} | ||
| labels: | ||
| proxy-type: "internal" | ||
| http: | ||
| enabled: true | ||
| servicePort: 80 | ||
| containerPort: 7000 | ||
| parameters: [] | ||
| tls: | ||
| enabled: true | ||
| servicePort: 443 | ||
| containerPort: 7443 | ||
| parameters: | ||
| - http2 | ||
| appProtocol: "" | ||
| stream: [] | ||
| ingress: | ||
| enabled: false |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,21 @@ | ||||||||||||||
| {{- if .Values.deployment.kong.enabled }} | ||||||||||||||
| {{- range $name, $svcConfig := .Values.additionalProxies }} | ||||||||||||||
| {{- if $svcConfig.enabled }} | ||||||||||||||
| {{- if or (and $svcConfig.http $svcConfig.http.enabled) (and $svcConfig.tls $svcConfig.tls.enabled) }} | ||||||||||||||
| {{- $serviceConfig := dict -}} | ||||||||||||||
| {{- $serviceConfig := merge $serviceConfig $svcConfig -}} | ||||||||||||||
| {{- $_ := set $serviceConfig "fullName" (include "kong.fullname" $) -}} | ||||||||||||||
| {{- $_ := set $serviceConfig "namespace" (include "kong.namespace" $) -}} | ||||||||||||||
| {{- $_ := set $serviceConfig "metaLabels" (include "kong.metaLabels" $) -}} | ||||||||||||||
| {{- $_ := set $serviceConfig "selectorLabels" (include "kong.selectorLabels" $) -}} | ||||||||||||||
| {{- $_ := set $serviceConfig "serviceName" (printf "proxy-%s" $name) }} | ||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm concerned about the length here; let me double-check the details.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The final Service name rendered by kong.service is charts/charts/kong/templates/_helpers.tpl Lines 172 to 176 in f0dfb5f
where The chart already applies charts/charts/kong/templates/_helpers.tpl Line 21 in f0dfb5f
I think we should do the same here. Something like:
|
||||||||||||||
| --- | ||||||||||||||
| {{ include "kong.service" $serviceConfig }} | ||||||||||||||
| {{- if (and $svcConfig.ingress $svcConfig.ingress.enabled) }} | ||||||||||||||
| --- | ||||||||||||||
| {{ include "kong.ingress" $serviceConfig }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- end }} | ||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additionalProxiesstreams are added to the deployment container ports, but are not included inKONG_STREAM_LISTENhere. This means Kong won't actually listen on those stream ports even though the container exposes them.Should add something similar to what was done for
KONG_PROXY_LISTENabove: