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 }}