Fix OpenShift Federation Ingress bug (#260)

* Fix OpenShift Federation Ingress bug

Signed-off-by: Maia Iyer <[email protected]>

* Remove duplicate line

Signed-off-by: Maia Iyer <[email protected]>

---------

Signed-off-by: Maia Iyer <[email protected]>
This commit is contained in:
Maia Iyer
2024-02-22 14:37:45 -08:00
committed by GitHub
parent a0baace5ea
commit bfbafbc94f
@@ -1,6 +1,9 @@
{{- if .Values.federation.enabled }}
{{- if .Values.federation.ingress.enabled -}}
{{- $svcName := include "spire-server.fullname" . }}
{{- $path := "/"}}
{{- $pathType := "Prefix" }}
{{- $tlsSection := true }}
{{/* Until https://github.com/spiffe/spire/issues/2202 is resolved, use ingress to implement cert-manager and externalSecret support. */}}
{{- $federationIngress := deepCopy .Values.federation.ingress }}
{{- if .Values.federation.tls.certManager.enabled }}
@@ -11,7 +14,6 @@
{{- $_ := set $federationIngress "tlsSecret" .Values.federation.tls.externalSecret.secretName }}
{{- end }}
{{- $ingressControllerType := include "spire-lib.ingress-controller-type" (dict "global" .Values.global "ingress" .Values.federation.ingress) }}
{{- $tlsSection := true }}
{{- $annotations := deepCopy .Values.federation.ingress.annotations }}
{{- if eq $ingressControllerType "ingress-nginx" }}
{{- $_ := set $annotations "nginx.ingress.kubernetes.io/ssl-redirect" "true" }}
@@ -42,6 +44,6 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{ include "spire-lib.ingress-spec" (dict "ingress" $federationIngress "svcName" $svcName "port" .Values.federation.bundleEndpoint.port "path" "/" "pathType" "Prefix" "tlsSection" $tlsSection "Values" .Values) | nindent 2 }}
{{ include "spire-lib.ingress-spec" (dict "ingress" $federationIngress "svcName" $svcName "port" .Values.federation.bundleEndpoint.port "path" $path "pathType" $pathType "tlsSection" $tlsSection "Values" .Values) | nindent 2 }}
{{- end }}
{{- end }}