Skip to content

Commit d421b35

Browse files
Merge pull request #20 from cookielab/fix_ingress_condition
fix: Ingress creation condition
2 parents 43da931 + 711f62b commit d421b35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

complex/templates/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- range $componentName, $component := .Values.components -}}
2-
{{ if and (or (eq $component.type "http") (eq $component.type "ingress")) (and $component.ingress $component.ingress.enabled) -}}
2+
{{ if and (or (eq $component.type "http") (eq $component.type "ingress")) (and (kindIs "map" $component.ingress) (or (not (hasKey $component.ingress "enabled")) $component.ingress.enabled)) -}}
33
{{- if and $component.ingress.traefikMiddlewareRefs (hasKey ($component.ingress.annotations | default dict) "traefik.ingress.kubernetes.io/router.middlewares") }}
44
{{- fail (printf "Component '%s' cannot use both 'traefikMiddlewareRefs' and manual 'traefik.ingress.kubernetes.io/router.middlewares' annotation. Use only one." $componentName) }}
55
{{- end }}

0 commit comments

Comments
 (0)