{{- if and .Values.database.postgres.enabled (not .Values.database.postgres.auth.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
  name: metadata-registry-db-secrets
type: Opaque
data:
  POSTGRES_USER: {{ .Values.database.postgres.auth.username | b64enc | quote }}
  POSTGRES_PASSWORD: {{ .Values.database.postgres.auth.password | b64enc | quote }}
{{- end }}