{{- if not .Values.postgresql.enabled }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: {{ include "backend.postgresql.passwordSecret" . }}
  labels:
    release: {{ .Release.Name }}
  annotations:
    "helm.sh/hook": "pre-install,pre-upgrade"
    "helm.sh/hook-delete-policy": "before-hook-creation"
data:
  postgresql-password: {{ .Values.appConfig.backend.database.connection.password | b64enc }}
{{- end }}
