apiVersion: v1
kind: Secret
metadata:
  name: {{ template "wordpress.fullname" . }}
  labels: {{- include "wordpress.labels" . | nindent 4 }}
type: Opaque
data:
  {{- if .Values.wordpressPassword }}
  wordpress-password: {{ .Values.wordpressPassword | b64enc | quote }}
  {{- else }}
  wordpress-password: {{ randAlphaNum 10 | b64enc | quote }}
  {{- end }}
  {{- if .Values.smtpPassword }}
  smtp-password: {{ .Values.smtpPassword | b64enc | quote }}
  {{- end }}
