From c631e32cd82bf2614ead406ff0d087b58e699f52 Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Wed, 6 Aug 2025 21:35:31 +1000 Subject: [PATCH] Update helm/passkey-auth/templates/ingress.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- helm/passkey-auth/templates/ingress.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/helm/passkey-auth/templates/ingress.yaml b/helm/passkey-auth/templates/ingress.yaml index ca3f903..e7660a8 100644 --- a/helm/passkey-auth/templates/ingress.yaml +++ b/helm/passkey-auth/templates/ingress.yaml @@ -10,13 +10,12 @@ metadata: name: {{ $fullName }} labels: {{- include "passkey-auth.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- if not (hasKey . "nginx.ingress.kubernetes.io/upstream-vhost") }} - nginx.ingress.kubernetes.io/upstream-vhost: {{ $.Values.config.webauthn.rpId | quote }} - {{- end }} + {{- $annotations := (deepCopy (default (dict) .Values.ingress.annotations)) }} + {{- if not (hasKey $annotations "nginx.ingress.kubernetes.io/upstream-vhost") }} + {{- $_ := set $annotations "nginx.ingress.kubernetes.io/upstream-vhost" $.Values.config.webauthn.rpId }} {{- end }} + annotations: + {{- toYaml $annotations | nindent 4 }} spec: {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} ingressClassName: {{ .Values.ingress.className }}