From 6ce041d94549d209b23da7a871fda1f84b6aa0a0 Mon Sep 17 00:00:00 2001 From: Sylvain Desbureaux Date: Wed, 25 Mar 2020 21:35:35 +0100 Subject: [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 Change-Id: Idc1062db5867bd23d580fbe59c90c0ce410151ce --- kubernetes/common/common/templates/_secret.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }} -- cgit 1.2.3-korg