[common] allow the use of tpl's for envFrom (#822)

* allow the use of tpl's for envFrom

* actuall this is a feature increase
This commit is contained in:
Kjeld Schouten-Lebbing
2021-08-27 15:05:33 +02:00
committed by GitHub
parent aa67220de4
commit 91a4659c56
2 changed files with 19 additions and 7 deletions
+1 -1
View File
@@ -18,4 +18,4 @@ maintainers:
name: common
sources: null
type: library
version: 6.9.2
version: 6.10.0
@@ -40,6 +40,10 @@
secretKeyRef:
name: {{ tpl $value.secretKeyRef.name $ | quote }}
key: {{ tpl $value.secretKeyRef.key $ | quote }}
{{- else if $value.configMapRef }}
configMapRef:
name: {{ tpl $value.configMapRef.name $ | quote }}
key: {{ tpl $value.configMapRef.key $ | quote }}
{{- else }}
{{- $value | toYaml | nindent 8 }}
{{- end }}
@@ -79,8 +83,16 @@
{{- end }}
{{- if or .Values.envFrom .Values.secret }}
envFrom:
{{- with .Values.envFrom }}
{{- toYaml . | nindent 4 }}
{{- range $key, $value := .Values.envFrom }}
{{- if $value.secretKeyRef }}
- secretKeyRef:
name: {{ tpl $value.secretKeyRef.name $ | quote }}
{{- else if $value.configMapRef }}
- configMapRef:
name: {{ tpl $value.configMapRef.name $ | quote }}
{- else }}
{{- toYaml $value | nindent 4 }}
{{- end }}
{{- end }}
{{- if .Values.secret }}
- secretRef: