{{- if .Values.createAdminSecret -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "couchdb.fullname" . }}
  labels:
    app: {{ template "couchdb.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
type: Opaque
data:
  adminUsername: {{ template "couchdb.defaultsecret" .Values.adminUsername }}
  adminPassword: {{ template "couchdb.defaultsecret" .Values.adminPassword }}
  cookieAuthSecret: {{ template "couchdb.defaultsecret" .Values.cookieAuthSecret }}
{{- end -}}
