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:
@@ -1,6 +1,9 @@
|
|||||||
{{- if .Values.federation.enabled }}
|
{{- if .Values.federation.enabled }}
|
||||||
{{- if .Values.federation.ingress.enabled -}}
|
{{- if .Values.federation.ingress.enabled -}}
|
||||||
{{- $svcName := include "spire-server.fullname" . }}
|
{{- $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. */}}
|
{{/* Until https://github.com/spiffe/spire/issues/2202 is resolved, use ingress to implement cert-manager and externalSecret support. */}}
|
||||||
{{- $federationIngress := deepCopy .Values.federation.ingress }}
|
{{- $federationIngress := deepCopy .Values.federation.ingress }}
|
||||||
{{- if .Values.federation.tls.certManager.enabled }}
|
{{- if .Values.federation.tls.certManager.enabled }}
|
||||||
@@ -11,7 +14,6 @@
|
|||||||
{{- $_ := set $federationIngress "tlsSecret" .Values.federation.tls.externalSecret.secretName }}
|
{{- $_ := set $federationIngress "tlsSecret" .Values.federation.tls.externalSecret.secretName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $ingressControllerType := include "spire-lib.ingress-controller-type" (dict "global" .Values.global "ingress" .Values.federation.ingress) }}
|
{{- $ingressControllerType := include "spire-lib.ingress-controller-type" (dict "global" .Values.global "ingress" .Values.federation.ingress) }}
|
||||||
{{- $tlsSection := true }}
|
|
||||||
{{- $annotations := deepCopy .Values.federation.ingress.annotations }}
|
{{- $annotations := deepCopy .Values.federation.ingress.annotations }}
|
||||||
{{- if eq $ingressControllerType "ingress-nginx" }}
|
{{- if eq $ingressControllerType "ingress-nginx" }}
|
||||||
{{- $_ := set $annotations "nginx.ingress.kubernetes.io/ssl-redirect" "true" }}
|
{{- $_ := set $annotations "nginx.ingress.kubernetes.io/ssl-redirect" "true" }}
|
||||||
@@ -42,6 +44,6 @@ metadata:
|
|||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
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 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user