{{- if and .Values.configsdb_postgresql.enabled .Values.configsdb_postgresql.auth.password -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "cortex.fullname" . }}-postgresql
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "cortex.labels" . | nindent 4 }}
data:
  postgresql-password: {{ .Values.configsdb_postgresql.auth.password | b64enc}}
{{- end }}
