A bit better control of env

This commit is contained in:
2024-07-15 19:48:53 +02:00
parent 8cbfaec5c2
commit 72b63e4a35
3 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,7 @@
{{- define "lib.config.env" -}}
{{- range $k, $v := .Values.env }}
{{- $customName := printf "%s-%s" (include "chart.fullname" $) $k }}
{{- if $v.enabled }}
---
apiVersion: v1
{{- if not $v.sensitive }}
@ -13,8 +14,10 @@ kind: Secret
stringData:
{{- end }}
{{- range $key, $value := $v.data }}
{{- if $value }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end -}}
{{- end }}
{{- end -}}