Skip to content
Closed
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
15 changes: 12 additions & 3 deletions charts/kubernetes-dashboard/templates/networking/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@


# Determine the service port to use for the ingress configuration
# If TLS is enabled in the ingress configuration, use the TLS service port.
# If TLS is enabled in the kong proxy 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) }}
{{- $servicePort := (ternary $.Values.kong.proxy.tls.servicePort $.Values.kong.proxy.http.servicePort $.Values.kong.proxy.tls.enabled) }}

# Determine the backend protocol to use for the ingress configuration
# If TLS is enabled in the kong proxy configuration, use HTTPS
# Otherwise, fall back to the HTTP
{{- $backendProtocol := (ternary "HTTPS" "HTTP" $.Values.kong.proxy.tls.enabled) }}

kind: Ingress
apiVersion: networking.k8s.io/v1
Expand All @@ -38,10 +43,14 @@ metadata:
cert-manager.io/cluster-issuer: {{ .Values.app.ingress.issuer.name }}
{{- end }}
{{- if .Values.app.ingress.useDefaultAnnotations }}
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/backend-protocol: "{{ $backendProtocol }}"
{{- if .Values.kong.proxy.tls.enabled }}
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
{{- end }}
{{- if .Values.app.ingress.tls.enabled }}
nginx.ingress.kubernetes.io/ssl-redirect: "true"
{{- end }}
{{- end }}
{{- if not (eq .Values.app.ingress.path "/") }}
nginx.ingress.kubernetes.io/rewrite-target: /$2
{{- end }}
Expand Down