diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index b0fca84cad9..7e8819cf48b 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -48,4 +48,4 @@ sources: - https://hub.docker.com/_/ - https://hub.docker.com/r/mikefarah/yq type: library -version: 28.12.5 +version: 28.12.6 diff --git a/charts/library/common/templates/addons/_gluetun.tpl b/charts/library/common/templates/addons/_gluetun.tpl index 9bf80a62867..ea0ca301701 100644 --- a/charts/library/common/templates/addons/_gluetun.tpl +++ b/charts/library/common/templates/addons/_gluetun.tpl @@ -11,21 +11,21 @@ It will include / inject the required templates based on the given values. {{- $fw := $glue.container.env.FIREWALL -}} {{- if (eq $fw "on") -}} + {{- $nets := list -}} {{- 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 -}} + {{- $nets = splitList "," $glue.container.env.FIREWALL_OUTBOUND_SUBNETS -}} {{- end -}} + {{- $nets = mustAppend $nets $.Values.chartContext.podCIDR -}} {{- $nets = mustAppend $nets $.Values.chartContext.svcCIDR -}} {{- $nets = mustUniq $nets -}} {{- $_ := set $glue.container.env "FIREWALL_OUTBOUND_SUBNETS" (join "," $nets) -}} - {{- $inputPorts := $glue.container.env.FIREWALL_INPUT_PORTS | splitList "," -}} - {{- if and - $.Values.service $.Values.service.main $.Values.service.main.ports - $.Values.service.main.ports.main $.Values.service.main.ports.main.port - -}} + {{- $inputPorts := list -}} + {{- if hasKey $glue.container.env "FIREWALL_INPUT_PORTS" -}} + {{- $inputPorts = splitList "," $glue.container.env.FIREWALL_INPUT_PORTS -}} + {{- end -}} + {{- if and $.Values.service $.Values.service.main $.Values.service.main.ports $.Values.service.main.ports.main $.Values.service.main.ports.main.port -}} {{- $inputPorts = mustAppend $inputPorts $.Values.service.main.ports.main.port -}} {{- end -}} {{- $inputPorts = $inputPorts | mustUniq -}} @@ -52,9 +52,7 @@ It will include / inject the required templates based on the given values. {{- $_ := set $secValues "enabled" true -}} {{- $_ := set $.Values.secret $secretName $secValues -}} - {{- $persistence := (dict - "enabled" true "type" "secret" "objectName" $secretName "targetSelector" dict "items" list - ) -}} + {{- $persistence := (dict "enabled" true "type" "secret" "objectName" $secretName "targetSelector" dict "items" list ) -}} {{- if $secValues.defaultMode -}} {{- $_ := set $persistence "defaultMode" $secValues.defaultMode -}} {{- end -}}