Helm-Toolkit: Update tls secret manifest for non public endpoints
This PS updates the tls secret manifest to allow non-public endpoints to be specified. Change-Id: I47606e5c8db87fac07febb114334ded710f56ed5 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
61829c0d45
commit
aac1c4e8c0
@ -55,10 +55,11 @@ return: |
|
|||||||
{{- $backendServiceType := index . "backendServiceType" }}
|
{{- $backendServiceType := index . "backendServiceType" }}
|
||||||
{{- $backendService := index . "backendService" | default "api" }}
|
{{- $backendService := index . "backendService" | default "api" }}
|
||||||
{{- $host := index $envAll.Values.endpoints ( $backendServiceType | replace "-" "_" ) "host_fqdn_override" }}
|
{{- $host := index $envAll.Values.endpoints ( $backendServiceType | replace "-" "_" ) "host_fqdn_override" }}
|
||||||
{{- if hasKey $host "public" }}
|
{{- if hasKey $host $endpoint }}
|
||||||
{{- if kindIs "map" $host.public }}
|
{{- $endpointHost := index $host $endpoint }}
|
||||||
{{- if hasKey $host.public "tls" }}
|
{{- if kindIs "map" $endpointHost }}
|
||||||
{{- if and $host.public.tls.key $host.public.tls.crt }}
|
{{- if hasKey $endpointHost "tls" }}
|
||||||
|
{{- if and $endpointHost.tls.key $endpointHost.tls.crt }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
@ -66,10 +67,10 @@ metadata:
|
|||||||
name: {{ index $envAll.Values.secrets.tls ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
|
name: {{ index $envAll.Values.secrets.tls ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
|
||||||
type: kubernetes.io/tls
|
type: kubernetes.io/tls
|
||||||
data:
|
data:
|
||||||
tls.crt: {{ $host.public.tls.crt | b64enc }}
|
tls.crt: {{ $endpointHost.tls.crt | b64enc }}
|
||||||
tls.key: {{ $host.public.tls.key | b64enc }}
|
tls.key: {{ $endpointHost.tls.key | b64enc }}
|
||||||
{{- if $host.public.tls.ca }}
|
{{- if $endpointHost.tls.ca }}
|
||||||
ca.crt: {{ $host.public.tls.ca | b64enc }}
|
ca.crt: {{ $endpointHost.tls.ca | b64enc }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user