From ecca6982faba2c90c2a466b80c2213d1a0c94008 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Fri, 22 Nov 2024 10:07:22 +0100 Subject: [PATCH] CH-162 fix for secrets controls --- deployment-configuration/helm/templates/auto-secrets.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deployment-configuration/helm/templates/auto-secrets.yaml b/deployment-configuration/helm/templates/auto-secrets.yaml index b1982c38..f1104782 100644 --- a/deployment-configuration/helm/templates/auto-secrets.yaml +++ b/deployment-configuration/helm/templates/auto-secrets.yaml @@ -22,10 +22,13 @@ stringData: # Refresh at any deployment for ? (pure random) value {{ $k }}: {{ randAlphaNum 20 }} {{- end }} - {{- else if not (hasKey $secret.data $k) }} + + {{- else if eq (typeOf $secret.data) "map" }} + {{- if not (hasKey $secret.data $k) }} # Create a random secret value if not specified in values.yaml if # it is not set and it is not already in the deployed secret (static random secret) {{ $k }}: {{ randAlphaNum 20 }} + {{- end}} {{- end}} {{- end }} {{- else }}