From 663a7e8c92492b5822f26625b9921feb73396ef5 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Fri, 22 Nov 2024 11:19:34 +0100 Subject: [PATCH] CH-162 fix empty secrets gen --- deployment-configuration/helm/templates/auto-secrets.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/deployment-configuration/helm/templates/auto-secrets.yaml b/deployment-configuration/helm/templates/auto-secrets.yaml index df91c466..ef6da926 100644 --- a/deployment-configuration/helm/templates/auto-secrets.yaml +++ b/deployment-configuration/helm/templates/auto-secrets.yaml @@ -1,5 +1,4 @@ {{- define "deploy_utils.secret" }} -{{- if .app.harness.secrets }} {{- $secret_name := printf "%s" .app.harness.deployment.name }} apiVersion: v1 kind: Secret @@ -38,15 +37,15 @@ stringData: {{ $k }}: {{ $v | default (randAlphaNum 20) }} {{- end }} {{- end }} -{{- end }} --- {{- end }} {{- range $app := .Values.apps }} + {{- if $app.harness.secrets }}{{- if ne (len $app.harness.secrets) 0 }} {{- include "deploy_utils.secret" (dict "root" $ "app" $app) }} + {{- end }}{{- end }} {{- range $subapp := $app }} {{- if contains "map" (typeOf $subapp) }} {{- if hasKey $subapp "harness" }} ---- {{- include "deploy_utils.secret" (dict "root" $ "app" $subapp) }} {{- end }} {{- end }}