From 2463981f661adf52fc84bc8e66befb8f63d1f70a Mon Sep 17 00:00:00 2001 From: Tobias Harnickell Date: Thu, 27 Jul 2023 12:08:22 +0200 Subject: [PATCH] Corrected ingress.ingress template conditional between `defaultBackend` and `rules` simplified. Signed-off-by: Tobias Harnickell --- charts/common/templates/_ingress-ingress.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/charts/common/templates/_ingress-ingress.yaml b/charts/common/templates/_ingress-ingress.yaml index 102f2730..51b4ea17 100644 --- a/charts/common/templates/_ingress-ingress.yaml +++ b/charts/common/templates/_ingress-ingress.yaml @@ -29,8 +29,8 @@ spec: {{- end }} {{- end }} {{- end }} + {{- if not $ingress.defaultBackend }} rules: - {{- if not $ingress.defaultBackend }} {{- range $ingress.rules }} - host: {{ .host }} http: @@ -49,12 +49,10 @@ spec: pathType: {{ .pathType | default "ImplementationSpecific" | quote }} {{- end }} {{- end }} - {{- end }} {{- if $ingress.tls }} {{- if and (ne $ingress.tls.type "none") (ne $ingress.tls.type "") }} tls: - hosts: - {{- if $ingress.rules }} {{- range $ingress.rules }} - {{ .host }} {{- end }} @@ -63,7 +61,7 @@ spec: {{- else if eq $ingress.tls.type "existing" }} secretName: {{ $ingress.tls.existing.secret }} {{- end }} - {{- end }} + {{- end }} {{- end }} {{- end }} {{- end }}