{{- if .Values.preferences.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "pgadmin4.fullname" . }}-preferences
  {{- with .Values.commonLabels }}
  labels: {{ . | toYaml | nindent 4 }}
  {{- end }}
  {{- with .Values.commonAnnotations }}
  annotations: {{ . | toYaml | nindent 4 }}
  {{- end }}
data:
  preferences.json: | {{ dict "preferences" .Values.preferences.data | toPrettyJson | nindent 4 }}
{{- end }}