apiVersion: v1
kind: Secret
metadata:
  name: {{ template "phabricator.fullname" . }}
  labels:
    app.kubernetes.io/name: {{ include "phabricator.name" . }}
    helm.sh/chart: {{ include "phabricator.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque
data:
  {{ if .Values.phabricatorPassword }}
  phabricator-password: {{ default "" .Values.phabricatorPassword | b64enc | quote }}
  {{ else }}
  phabricator-password: {{ randAlphaNum 10 | b64enc | quote }}
  {{ end }}
  smtp-password: {{ default "" .Values.smtpPassword | b64enc | quote }}
