dashboard/deployment/helmchart/templates/secrets-admin-panel.yaml

24 lines
1,023 B
YAML
Raw Normal View History

{{- if (include "backend.createSecret" .) }}
2021-09-30 16:03:54 +02:00
apiVersion: v1
kind: Secret
metadata:
name: {{ include "backend.secretName" . }}
2021-09-30 16:03:54 +02:00
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if and (.Values.backend.password) (not .Values.backend.existingSecret) }}
backend-password: {{ .Values.backend.password | b64enc | quote }}
{{- else if not .Values.backend.existingSecret }}
backend-password: {{ randAlphaNum 10 | b64enc | quote }}
2021-09-30 16:03:54 +02:00
{{- end }}
{{- if and (.Values.backend.smtp.password) (.Values.backend.smtp.enabled) (not .Values.backend.smtp.existingSecret) }}
smtp-password: {{ .Values.backend.smtp.password | b64enc | quote }}
2021-09-30 16:03:54 +02:00
{{- end }}
{{- end }}