{{- if and .Values.postgresql.enabled (not .Values.postgresql.existingSecret) -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "wiki.postgresql.fullname" . }}
  labels:
    {{- include "wiki.labels" . | nindent 4 }}
type: Opaque
data:
  postgresql-password: {{ .Values.postgresql.postgresqlPassword | b64enc | quote }}
  postgresql-username: {{ .Values.postgresql.postgresqlUser | b64enc | quote }}
{{- end }}
