PMM HA works fine with externally managed databases if the chart is modified, but it's not possible without forking current PMM HA chart, because Postgresql, Clickhouse and VM database URLs are hardcoded in the chart.
|
value: "postgres://$(GF_USERNAME):$(GF_PASSWORD)@{{ .Release.Name }}-pg-db-ha.{{ .Release.Namespace }}.svc.cluster.local:5432/grafana" |
It will be great to check if a corresponding variable in .Values.pmmEnv is defined and use it instead of bundled database connection, e.g.:
{{- $dbHost := default (printf "%s-pg-db-ha.%s.svc.cluster.local:5432" .Release.Name .Release.Namespace) .Values.pmmEnv.GF_DATABASE_HOST }}
{{- $dbName := default "grafana" .Values.pmmEnv.GF_DATABASE_NAME }}
- name: GF_DATABASE_NAME
value: {{ $dbName | quote }}