apiVersion: v1
kind: Secret
metadata:
  name: {{ template "redmine.fullname" . }}
  labels:
    app: {{ template "redmine.fullname" . }}
    chart: {{ template "redmine.chart" . }}
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
type: Opaque
data:
  {{ if .Values.redminePassword }}
  redmine-password: {{ default "" .Values.redminePassword | b64enc | quote }}
  {{ else }}
  redmine-password: {{ randAlphaNum 10 | b64enc | quote }}
  {{ end }}
  smtp-password: {{ default "" .Values.smtpPassword | b64enc | quote }}
