diff --git a/charts/pixelfed/templates/secret_mail.yaml b/charts/pixelfed/templates/secret_mail.yaml index d91618e..fe329dc 100644 --- a/charts/pixelfed/templates/secret_mail.yaml +++ b/charts/pixelfed/templates/secret_mail.yaml @@ -1,4 +1,6 @@ {{- if not .Values.pixelfed.mail.existingSecret }} +{{- $username := .Values.pixelfed.mail.username | required ".Values.pixelfed.mail.username is required" }} +{{- $password := .Values.pixelfed.mail.password | required ".Values.pixelfed.mail.password is required" }} --- apiVersion: v1 kind: Secret @@ -8,9 +10,9 @@ data: host: {{ .Values.pixelfed.mail.host | b64enc }} port: {{ .Values.pixelfed.mail.port | quote | b64enc}} {{- if .Values.pixelfed.mail.username }} - username: {{ .Values.pixelfed.mail.username | b64enc }} + username: {{ $username | b64enc }} {{- end }} {{- if .Values.pixelfed.mail.password }} - password: {{ .Values.pixelfed.mail.password | b64enc }} + password: {{ $password | b64enc }} {{- end }} {{- end }}