apiVersion: v1
kind: Secret
metadata:
  labels:
    app: {{ template "grafana.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    heritage: "{{ .Release.Service }}"
    release: "{{ .Release.Name }}"
  name: {{ template "grafana.server.fullname" . }}
type: Opaque
data:
  {{- if .Values.adminPassword }}
  password: {{ .Values.adminPassword | b64enc | quote }}
  {{- else }}
  password: {{ randAlphaNum 10 | b64enc | quote }}
  {{- end }}
  user: {{ .Values.adminUser | b64enc | quote }}
