{{- if .Values.lighthouse.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "backstage.fullname" . -}}-lighthouse
data:
  PGDATABASE: {{ .Values.lighthouse.database.connection.database | quote }}
  PGUSER: {{ include "lighthouse.postgresql.user" . | quote }}
  PGPORT: {{ include "lighthouse.postgresql.port" . | quote }}
  PGHOST: {{ include "lighthouse.postgresql.host" . | quote }}
  PGPATH_TO_CA: {{ include "backstage.lighthouse.postgresCaFilename" . | quote }}
{{- end }}