diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index a93b3020124..c7203fe2c13 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -18,4 +18,4 @@ maintainers: name: common sources: null type: library -version: 6.10.2 +version: 6.10.3 diff --git a/charts/library/common/templates/lib/controller/_container.tpl b/charts/library/common/templates/lib/controller/_container.tpl index f05d853d8a6..c15f0b54d75 100644 --- a/charts/library/common/templates/lib/controller/_container.tpl +++ b/charts/library/common/templates/lib/controller/_container.tpl @@ -81,23 +81,20 @@ {{- end }} {{- end }} {{- end }} - {{- if or .Values.envFrom .Values.secret }} envFrom: - {{- range $key, $value := .Values.envFrom }} - {{- if $value.secretKeyRef }} - - secretKeyRef: - name: {{ tpl $value.secretKeyRef.name $ | quote }} - {{- else if $value.configMapRef }} + {{- range .Values.envFrom -}} + {{- if .secretRef }} + - secretRef: + name: {{ tpl .secretRef.name $ | quote }} + {{- else if .configMapRef }} - configMapRef: - name: {{ tpl $value.configMapRef.name $ | quote }} - {{- else }} - {{- toYaml $value | nindent 4 }} - {{- end }} + name: {{ tpl .configMapRef.name $ | quote }} + {{- else }} {{- end }} + {{- end -}} {{- if .Values.secret }} - - secretRef: - name: {{ include "common.names.fullname" . }} - {{- end }} + - secretRef: + name: {{ include "common.names.fullname" . }} {{- end }} {{- include "common.controller.ports" . | trim | nindent 2 }} {{- with (include "common.controller.volumeMounts" . | trim) }}