fix(NONE): Fix secrets to fail if username/password not set -- otherwise pod does not come up

This commit is contained in:
黃健毅
2025-01-22 07:25:18 +00:00
parent cf128bf9d4
commit 64566d6ebe
+4 -2
View File
@@ -1,4 +1,6 @@
{{- if not .Values.pixelfed.mail.existingSecret }} {{- 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 apiVersion: v1
kind: Secret kind: Secret
@@ -8,9 +10,9 @@ data:
host: {{ .Values.pixelfed.mail.host | b64enc }} host: {{ .Values.pixelfed.mail.host | b64enc }}
port: {{ .Values.pixelfed.mail.port | quote | b64enc}} port: {{ .Values.pixelfed.mail.port | quote | b64enc}}
{{- if .Values.pixelfed.mail.username }} {{- if .Values.pixelfed.mail.username }}
username: {{ .Values.pixelfed.mail.username | b64enc }} username: {{ $username | b64enc }}
{{- end }} {{- end }}
{{- if .Values.pixelfed.mail.password }} {{- if .Values.pixelfed.mail.password }}
password: {{ .Values.pixelfed.mail.password | b64enc }} password: {{ $password | b64enc }}
{{- end }} {{- end }}
{{- end }} {{- end }}