{{- if and (not .Values.postgresql.enabled) (not .Values.external.postgres.auth.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "nemo-evaluator.database.secretName" . }}
  namespace: {{ include "common.names.namespace" . | quote }}
type: Opaque
data:
  password: {{ .Values.external.postgres.auth.password | b64enc | quote }}
{{- end }}