From b4e4102c8fbfb88b3e3c208ede71cbeaa893a7cd Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Wed, 6 Nov 2024 18:40:25 +0100 Subject: [PATCH] CH-162 fix for non string secrets --- deployment-configuration/helm/templates/auto-secrets.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment-configuration/helm/templates/auto-secrets.yaml b/deployment-configuration/helm/templates/auto-secrets.yaml index 3dd6427f..df92258a 100644 --- a/deployment-configuration/helm/templates/auto-secrets.yaml +++ b/deployment-configuration/helm/templates/auto-secrets.yaml @@ -15,10 +15,10 @@ type: Opaque stringData: {{- range $k, $v := .app.harness.secrets }} - {{- if and $v (ne $v "?") }} + {{- if and $v (and (eq (typeOf $v) "string") (ne $v "?")) }} # Set secret value to value in values.yaml if specified {{ $k }}: {{ $v }} - {{- else if or (eq $v "?") (not (hasKey $secret.data $k)) }} + {{- else if or (and (eq (typeOf $v) "string") (eq $v "?")) (not (hasKey $secret.data $k)) }} # Create a random secret value if not specified in values.yaml if: # 1. it is not set and it is not already in the deployed secret (static random secret) # 2. its value is ? (dynamic random secret)