Skip to content

Commit c5a8e71

Browse files
tpl statekey & extra env vars
1 parent 9fddd76 commit c5a8e71

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

charts/port-k8s-exporter/templates/configmap.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if eq .Values.configMap.create true -}}
2-
{{- $stateKey := lower (default (uuidv4 | replace "-" "") .Values.stateKey) -}}
2+
{{- $stateKey := lower (default (uuidv4 | replace "-" "") (tpl .Values.stateKey $)) -}}
33
{{- $config_lookup := (lookup "v1" "ConfigMap" .Release.Namespace (include "port-k8s-exporter.configMapName" .)) -}}
44
{{- if (($config_lookup).data).state_key -}}
55
{{- $stateKey = $config_lookup.data.state_key -}}

charts/port-k8s-exporter/templates/deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ spec:
7878
volumeMounts:
7979
- name: config-volume
8080
mountPath: "/config"
81-
{{- with .Values.extraVolumeMounts }}
82-
{{- toYaml . | nindent 12 }}
81+
{{- if .Values.extraVolumeMounts }}
82+
{{- tpl (toYaml .) $ | nindent 12 }}
8383
{{- end }}
8484
volumes:
8585
- name: config-volume

0 commit comments

Comments
 (0)