[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user