diff --git a/charts/transmission/templates/_helpers/envs.tpl b/charts/transmission/templates/_helpers/envs.tpl new file mode 100644 index 0000000..822c03a --- /dev/null +++ b/charts/transmission/templates/_helpers/envs.tpl @@ -0,0 +1,6 @@ +{{ define "envs" }} +{{- range $key, $val := . }} +- name: {{ $key }} + value: {{ $val | quote }} +{{ end -}} +{{ end }} \ No newline at end of file diff --git a/charts/transmission/templates/deploy.yaml b/charts/transmission/templates/deploy.yaml index ef8dcd8..ce473c8 100644 --- a/charts/transmission/templates/deploy.yaml +++ b/charts/transmission/templates/deploy.yaml @@ -27,7 +27,7 @@ spec: containers: - name: main env: - {{ $.Values.transmission.env | toYaml | nindent 25 }} + {{ include "envs" $.Values.transmission.env | nindent 25 }} image: "{{ $.Values.transmission.image }}" imagePullPolicy: Always resources: @@ -35,7 +35,7 @@ spec: initContainers: - name: vpn env: - {{ $.Values.gluetun.env | toYaml | nindent 25 }} + {{ include "envs" $.Values.gluetun.env | nindent 25 }} envFrom: {{ $.Values.gluetun.envFrom | toYaml | nindent 25 }} image: {{ $.Values.gluetun.image }} diff --git a/charts/transmission/values.yaml b/charts/transmission/values.yaml index 1149461..810059f 100644 --- a/charts/transmission/values.yaml +++ b/charts/transmission/values.yaml @@ -2,19 +2,20 @@ transmission: image: linuxserver/transmission env: - - name: PUID - value: "1000" - - name: PGID - value: "100" - - name: TZ - value: Etc/UTC + PUID: "1000" + PGID: "100" + TZ: Etc/UTC volumes: [] resources: {} gluetun: image: qmcgaw/gluetun:v3 resources: {} - env: [] + env: + HEALTH_VPN_DURATION_INITIAL: 120s + BLOCK_MALICIOUS: "off" + DNS_KEEP_NAMESERVER: "on" + FIREWALL_OUTBOUND_SUBNETS: 10.42.0.0/15 envFrom: [] busybox: