diff options
author | 2021-09-23 13:41:03 +0000 | |
---|---|---|
committer | 2021-09-23 13:41:03 +0000 | |
commit | 399e4f083187cc7021faf72f55a1c8332c82bdb8 (patch) | |
tree | 6cb397dd2e3ff05f1d16d23d9c4a5da2526725a0 /kubernetes | |
parent | 971fac5ee071235248d6bc02dca1df55ac652dae (diff) | |
parent | 0d463642fb112a01a92e41abc27fe8332aa5bd2a (diff) |
Merge "[COMMON] Fix genericKV cache generation"
Diffstat (limited to 'kubernetes')
-rw-r--r-- | kubernetes/common/common/templates/_secret.tpl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kubernetes/common/common/templates/_secret.tpl b/kubernetes/common/common/templates/_secret.tpl index 2490debffb..9d284de500 100644 --- a/kubernetes/common/common/templates/_secret.tpl +++ b/kubernetes/common/common/templates/_secret.tpl @@ -193,7 +193,7 @@ type: Opaque {{- $entry := dict }} {{- $uid := tpl (default "" $secret.uid) $global }} {{- $keys := keys $secret }} - {{- range $key := (without $keys "annotations" "filePaths" )}} + {{- range $key := (without $keys "annotations" "filePaths" "envs" )}} {{- $_ := set $entry $key (tpl (index $secret $key) $global) }} {{- end }} {{- if $secret.annotations }} @@ -213,12 +213,21 @@ type: Opaque {{- $_ := set $entry "filePaths" $secret.filePaths }} {{- end }} {{- end }} + {{- if $secret.envs }} + {{- $envsCache := (list) }} + {{- range $env := $secret.envs }} + {{- $tplValue := tpl (default "" $env.value) $global }} + {{- $envsCache = append $envsCache (dict "name" $env.name "policy" $env.policy "value" $tplValue) }} + {{- end }} + {{- $_ := set $entry "envs" $envsCache }} + {{- end }} {{- $realName := default (include "common.secret.genNameFast" (dict "global" $global "uid" $uid "name" $entry.name) ) $entry.externalSecret }} {{- $_ := set $entry "realName" $realName }} {{- $_ := set $secretCache $uid $entry }} {{- end }} {{- $_ := set $global.Values "_secretsCache" $secretCache }} {{- end }} + {{- end -}} {{/* |