Skip to content

Commit

Permalink
CH-162 fix empty secrets gen
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Nov 22, 2024
1 parent 3461199 commit 663a7e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions deployment-configuration/helm/templates/auto-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- define "deploy_utils.secret" }}
{{- if .app.harness.secrets }}
{{- $secret_name := printf "%s" .app.harness.deployment.name }}
apiVersion: v1
kind: Secret
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 663a7e8

Please sign in to comment.