postfixadmin-charts/templates/postfixadmin/secrets.yaml
Markus Pesch aeaae484d3
All checks were successful
continuous-integration/drone/push Build is passing
Initial Commit
2021-09-26 20:56:02 +02:00

20 lines
510 B
YAML

apiVersion: v1
kind: Secret
metadata:
name: {{ include "postfixadmin.fullname" . }}
type: Opaque
stringData:
{{- if not (hasKey .Values "config") -}}
{{- $_ := set .Values "config" dict -}}
{{- end -}}
{{- if not (hasKey .Values.config "POSTFIXADMIN_SETUP_PASSWORD") -}}
{{- $_ := set .Values.config "POSTFIXADMIN_SETUP_PASSWORD" (randAlphaNum 48 | quote ) -}}
{{- end -}}
{{/* SETUP CONFIG */}}
{{ range $key, $value := .Values.config }}
{{ upper $key}}: {{ quote $value }}
{{ end }}