From 2eb2d61a2f0b199b704bb7bbf6ee627eb00bd71c Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Thu, 12 Aug 2021 12:29:23 +0200 Subject: [PATCH] update common to support tpl for fromsecret envs --- charts/library/common/Chart.yaml | 2 +- .../library/common/templates/lib/controller/_container.tpl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index 156c6fbf77c..c03c6a22b39 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -18,4 +18,4 @@ maintainers: name: common sources: type: library -version: 6.7.0 +version: 6.8.0 diff --git a/charts/library/common/templates/lib/controller/_container.tpl b/charts/library/common/templates/lib/controller/_container.tpl index 9bac3a87342..15c622cdbe7 100644 --- a/charts/library/common/templates/lib/controller/_container.tpl +++ b/charts/library/common/templates/lib/controller/_container.tpl @@ -36,7 +36,13 @@ {{- range $key, $value := .Values.envValueFrom }} - name: {{ $key }} valueFrom: + {{- if $value.secretKeyRef }} + secretKeyRef: + name: {{ tpl $value.secretKeyRef.name $ | quote }} + key: {{ tpl $value.secretKeyRef.key $ | quote }} + {{- else }} {{- $value | toYaml | nindent 8 }} + {{- end }} {{- end }} {{- range $envList := .Values.envList }} {{- if and $envList.name $envList.value }}