diff --git a/helm-toolkit/templates/manifests/_ingress.yaml.tpl b/helm-toolkit/templates/manifests/_ingress.yaml.tpl index 0934c36f2..ee33997f8 100644 --- a/helm-toolkit/templates/manifests/_ingress.yaml.tpl +++ b/helm-toolkit/templates/manifests/_ingress.yaml.tpl @@ -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 }} diff --git a/helm-toolkit/templates/manifests/_secret-tls.yaml.tpl b/helm-toolkit/templates/manifests/_secret-tls.yaml.tpl index 1ca967f32..0dbefa195 100644 --- a/helm-toolkit/templates/manifests/_secret-tls.yaml.tpl +++ b/helm-toolkit/templates/manifests/_secret-tls.yaml.tpl @@ -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 }}