diff --git a/anycable-go/templates/ingress-tls-secret.yml b/anycable-go/templates/ingress-tls-secret.yml index adb816a..3e7fca9 100644 --- a/anycable-go/templates/ingress-tls-secret.yml +++ b/anycable-go/templates/ingress-tls-secret.yml @@ -1,15 +1,15 @@ {{- $values := include "anycableGo.values" . | fromYaml }} -{{- with ($values.ingress.nonAcme.hosts | default dict) }} -{{- if (.tls | and .tls.key | and .tls.crt) }} +{{- range $host := ($values.ingress.nonAcme.hosts | default list) }} + {{- if ($host.tls | and $host.tls.key | and $host.tls.crt) }} --- apiVersion: v1 kind: Secret metadata: creationTimestamp: null - name: {{ .secretName }} + name: {{ $host.secretName }} type: kubernetes.io/tls data: - tls.crt: {{ .tls.crt | b64enc | quote }} - tls.key: {{ .tls.key | b64enc | quote }} -{{- end }} + tls.crt: {{ $host.tls.crt | b64enc | quote }} + tls.key: {{ $host.tls.key | b64enc | quote }} + {{- end }} {{- end }}