fix(common): fix gluten trying to fetch empty variables

Signed-off-by: Kjeld Schouten <info@kjeldschouten.nl>
This commit is contained in:
Kjeld Schouten
2025-07-06 10:57:42 +02:00
committed by GitHub
parent 5b16e3bc82
commit c3501012d4
@@ -11,7 +11,11 @@ It will include / inject the required templates based on the given values.
{{- $fw := $glue.container.env.FIREWALL -}}
{{- if (eq $fw "on") -}}
{{- $nets := $glue.container.env.FIREWALL_OUTBOUND_SUBNETS | splitList "," -}}
{{- if and (hasKey $glue.container.env "FIREWALL_OUTBOUND_SUBNETS") (ne $glue.container.env.FIREWALL_OUTBOUND_SUBNETS "") -}}
{{- $nets := splitList "," $glue.container.env.FIREWALL_OUTBOUND_SUBNETS }}
{{- else -}}
{{- $nets := list -}}
{{- end -}}
{{- $nets = mustAppend ($nets $.Values.chartContext.podCIDR $.Values.chartContext.svcCIDR) | mustUniq -}}
{{- $_ := set $glue.container.env "FIREWALL_OUTBOUND_SUBNETS" (join "," $nets) -}}