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