* Support federation bundle endpoint profile http_web certificates Signed-off-by: Kevin Fox <[email protected]> * Fix var Signed-off-by: Kevin Fox <[email protected]> * Fix key Signed-off-by: Kevin Fox <[email protected]> * Fix test Signed-off-by: Kevin Fox <[email protected]> * Fix test Signed-off-by: Kevin Fox <[email protected]> * Fix test Signed-off-by: Kevin Fox <[email protected]> * Fix test Signed-off-by: Kevin Fox <[email protected]> --------- Signed-off-by: Kevin Fox <[email protected]>
35 lines
1.6 KiB
YAML
35 lines
1.6 KiB
YAML
{{- if .Values.federation.enabled }}
|
|
{{- if .Values.federation.ingress.enabled -}}
|
|
{{- $svcName := include "spire-server.fullname" . }}
|
|
{{- $path := "/"}}
|
|
{{- $pathType := "Prefix" }}
|
|
{{- $tlsSection := true }}
|
|
{{- $ingressControllerType := include "spire-lib.ingress-controller-type" (dict "global" .Values.global "ingress" .Values.federation.ingress) }}
|
|
{{- $annotations := deepCopy .Values.federation.ingress.annotations }}
|
|
{{- if eq $ingressControllerType "ingress-nginx" }}
|
|
{{- $_ := set $annotations "nginx.ingress.kubernetes.io/ssl-redirect" "true" }}
|
|
{{- $_ := set $annotations "nginx.ingress.kubernetes.io/force-ssl-redirect" "true" }}
|
|
{{- $_ := set $annotations "nginx.ingress.kubernetes.io/backend-protocol" "HTTPS" }}
|
|
{{- $_ := set $annotations "nginx.ingress.kubernetes.io/ssl-passthrough" "true" }}
|
|
{{- else if eq $ingressControllerType "openshift" }}
|
|
{{- $_ := set $annotations "route.openshift.io/termination" "passthrough" }}
|
|
{{- $path = "" }}
|
|
{{- $pathType = "ImplementationSpecific" }}
|
|
{{- $tlsSection = false }}
|
|
{{- end }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ printf "%s-federation" $svcName }}
|
|
namespace: {{ include "spire-server.namespace" . }}
|
|
labels:
|
|
{{ include "spire-server.labels" . | nindent 4 }}
|
|
{{- with $annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{ include "spire-lib.ingress-spec" (dict "ingress" .Values.federation.ingress "svcName" $svcName "port" .Values.federation.bundleEndpoint.port "path" $path "pathType" $pathType "tlsSection" $tlsSection "Values" .Values) | nindent 2 }}
|
|
{{- end }}
|
|
{{- end }}
|