summaryrefslogtreecommitdiffstats
path: root/kubernetes/common
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-25 21:35:35 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-26 12:42:13 +0000
commit6ce041d94549d209b23da7a871fda1f84b6aa0a0 (patch)
tree3f4080734caacb9d79f07cf127b393f97b32f190 /kubernetes/common
parent24ae34884336d500a97ba24fa0e9cea670a2abf0 (diff)
[COMMON] Handle generic secrets in secretFast
Generic secrets needs filePaths key in their dictionary which was not correctly handled by previous implementation of secretFast. Issue-ID: OOM-2051 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Idc1062db5867bd23d580fbe59c90c0ce410151ce
Diffstat (limited to 'kubernetes/common')
-rw-r--r--kubernetes/common/common/templates/_secret.tpl5
1 files changed, 4 insertions, 1 deletions
diff --git a/kubernetes/common/common/templates/_secret.tpl b/kubernetes/common/common/templates/_secret.tpl
index a89ab6dfc7..78e94eab91 100644
--- a/kubernetes/common/common/templates/_secret.tpl
+++ b/kubernetes/common/common/templates/_secret.tpl
@@ -189,12 +189,15 @@ type: Opaque
{{- $entry := dict }}
{{- $uid := tpl (default "" $secret.uid) $global }}
{{- $keys := keys $secret }}
- {{- range $key := (without $keys "annotations" )}}
+ {{- range $key := (without $keys "annotations" "filePaths" )}}
{{- $_ := set $entry $key (tpl (index $secret $key) $global) }}
{{- end }}
{{- if $secret.annotations }}
{{- $_ := set $entry "annotations" $secret.annotations }}
{{- end }}
+ {{- if $secret.filePaths }}
+ {{- $_ := set $entry "filePaths" $secret.filePaths }}
+ {{- 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 }}