From 64566d6ebe60c1836199e0b27eb7a6187a95801d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=83=E5=81=A5=E6=AF=85?= <2756283+huang-jy@users.noreply.github.com> Date: Wed, 22 Jan 2025 07:25:18 +0000 Subject: [PATCH] fix(NONE): Fix secrets to fail if username/password not set -- otherwise pod does not come up --- charts/pixelfed/templates/secret_mail.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 }}