fix(helm): merge customAnnotations with class-specific ingress annotations (#2161)

Signed-off-by: Philip Schmid <philip.schmid@protonmail.com>
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
Philip Schmid
2026-03-15 02:22:12 +01:00
committed by GitHub
parent 7f1cdaedad
commit 9179fd5608
4 changed files with 11 additions and 7 deletions
+5 -4
View File
@@ -1,11 +1,12 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressAnnotations := dict }}
{{- if eq .Values.ingress.className "nginx" }}
{{- $ingressAnnotations = .Values.ingress.nginxAnnotations }}
{{- $ingressAnnotations = deepCopy (default (dict) .Values.ingress.nginxAnnotations) }}
{{- else if eq .Values.ingress.className "traefik" }}
{{- $ingressAnnotations = .Values.ingress.traefikAnnotations }}
{{- else if eq .Values.ingress.className "" }}
{{- $ingressAnnotations = .Values.ingress.customAnnotations }}
{{- $ingressAnnotations = deepCopy (default (dict) .Values.ingress.traefikAnnotations) }}
{{- end }}
{{- with .Values.ingress.customAnnotations }}
{{- $ingressAnnotations = merge $ingressAnnotations . }}
{{- end }}
apiVersion: networking.k8s.io/v1
kind: Ingress