apiVersion: v1
kind: Secret
metadata:
  name: {{ include "parse.fullname" . }}
  labels: {{ include "parse.labels" . | nindent 4 }}
type: Opaque
data:
  {{ if .Values.server.masterKey }}
  master-key: {{ .Values.server.masterKey | b64enc | quote }}
  {{ else }}
  master-key: {{ randAlphaNum 10 | b64enc | quote }}
  {{ end }}
  {{ if .Values.dashboard.enabled }}
  {{ if .Values.dashboard.password }}
  parse-dashboard-password: {{ .Values.dashboard.password | b64enc | quote }}
  {{ else }}
  parse-dashboard-password: {{ randAlphaNum 10 | b64enc | quote }}
  {{ end }}
  {{ end }}
