Ingress: make tls functions gotpl yaml safe
This PS updates the tls functions to be yaml safe for the service name. Change-Id: I535f38a8d92c01280d79926a1f0acd06984aabbf Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
469fe37c3e
commit
326303702d
@ -67,12 +67,12 @@ metadata:
|
||||
kubernetes.io/ingress.class: {{ index $envAll.Values.network $backendService "ingress" "classes" $ingressController | quote }}
|
||||
{{ toYaml (index $envAll.Values.network $backendService "ingress" "annotations") | indent 4 }}
|
||||
spec:
|
||||
{{- $host := index $envAll.Values.endpoints $backendServiceType "host_fqdn_override" }}
|
||||
{{- $host := index $envAll.Values.endpoints ( $backendServiceType | replace "-" "_" ) "host_fqdn_override" }}
|
||||
{{- if $host.public }}
|
||||
{{- if $host.public.tls }}
|
||||
{{- if and $host.public.tls.key $host.public.tls.crt }}
|
||||
tls:
|
||||
- secretName: {{ index $envAll.Values.secrets "tls" $backendServiceType $backendService "public" }}
|
||||
- secretName: {{ index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService "public" }}
|
||||
hosts:
|
||||
- {{ index $hostNameFullRules "vHost" }}
|
||||
{{- end }}
|
||||
|
@ -19,7 +19,7 @@ limitations under the License.
|
||||
{{- $endpoint := index . "endpoint" | default "public" }}
|
||||
{{- $backendServiceType := index . "backendServiceType" }}
|
||||
{{- $backendService := index . "backendService" | default "api" }}
|
||||
{{- $host := index $envAll.Values.endpoints $backendServiceType "host_fqdn_override" }}
|
||||
{{- $host := index $envAll.Values.endpoints ( $backendServiceType | replace "-" "_" ) "host_fqdn_override" }}
|
||||
{{- if $host.public }}
|
||||
{{- if $host.public.tls }}
|
||||
{{- if and $host.public.tls.key $host.public.tls.crt }}
|
||||
@ -27,7 +27,7 @@ limitations under the License.
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ index $envAll.Values.secrets.tls $backendServiceType $backendService $endpoint }}
|
||||
name: {{ index $envAll.Values.secrets.tls ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ $host.public.tls.crt | b64enc }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user