apiVersion: v1
kind: Secret
metadata:
  name: {{ template "hackmd.fullname" . }}
  labels:
    app: {{ template "hackmd.name" . }}
    chart: {{ template "hackmd.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  {{- if .Values.sessionSecret }}
  sessionSecret: {{ .Values.sessionSecret | b64enc | quote }}
  {{- else }}
  sessionSecret: {{ randAlphaNum 10 | b64enc | quote }}
  {{- end }}
