apiVersion: v1
kind: Secret
metadata:
  name: {{ template "scdf.fullname" . }}
  labels:
    app: {{ template "scdf.name" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
type: Opaque
data:
  {{- if .Values.dataflowAdminPassword }}
  data-flow-admin-password: {{ .Values.dataflowAdminPassword | b64enc | quote }}
  {{- else }}
  data-flow-admin-password: {{ randAlphaNum 10 | b64enc | quote }}
  {{- end }}
  {{- if .Values.dataflowPassword }}
  data-flow-password: {{ .Values.dataflowPassword | b64enc | quote }}
  {{- else }}
  data-flow-password: {{ randAlphaNum 10 | b64enc | quote }}
  {{- end }}
