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

fix: use correct Kong service port for ingress based on TLS settings #9863

Merged
merged 1 commit into from
Jan 30, 2025
Merged
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
10 changes: 8 additions & 2 deletions charts/kubernetes-dashboard/templates/networking/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
{{- if and .Values.app.ingress.enabled (eq .Values.app.mode "dashboard")}}
{{- include "kubernetes-dashboard.validate.ingressIssuerScope" $ }}


# Determine the service port to use for the ingress configuration
# If TLS is enabled in the ingress configuration, use the TLS service port.
# Otherwise, fall back to the HTTP service port.
{{- $servicePort := (ternary $.Values.kong.proxy.tls.servicePort $.Values.kong.proxy.http.servicePort $.Values.app.ingress.tls.enabled) }}

kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
Expand Down Expand Up @@ -73,7 +79,7 @@ spec:
service:
name: {{ template "kong.fullname" (index $.Subcharts "kong") }}-proxy
port:
number: {{ $.Values.kong.proxy.tls.servicePort }}
number: {{ $servicePort }}
{{- end }}
{{- else }}
- http:
Expand All @@ -84,6 +90,6 @@ spec:
service:
name: {{ template "kong.fullname" (index $.Subcharts "kong") }}-proxy
port:
number: {{ $.Values.kong.proxy.tls.servicePort }}
number: {{ $servicePort }}
{{- end }}
{{- end }}
Loading