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