{{ if not .Values.existingSecret }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "openldap.fullname" . }}
  labels:
    app: {{ template "openldap.name" . }}
    chart: {{ template "openldap.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
{{- if .Values.extraLabels }}
{{ toYaml .Values.extraLabels | indent 4 }}
{{- end }}
type: Opaque
data:
  LDAP_ADMIN_PASSWORD: {{ .Values.adminPassword | b64enc | quote }}
  LDAP_CONFIG_PASSWORD: {{ .Values.configPassword  | b64enc | quote }}
{{ end }}
