{{- if .Values.postgresql.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ .Release.Name }}-postgresql-primary-hba
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ .Release.Name }}-postgresql
    app.kubernetes.io/part-of: oneuptime
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: postgresql
    appname: oneuptime
data:
  pg_hba.conf: |
{{ .Values.postgresql.primary.hbaConfiguration | indent 4 }}
{{- end }}