diff --git a/charts/atlantis/templates/cluster.yaml b/charts/atlantis/templates/cluster.yaml index 2659d0db..6c4a0438 100644 --- a/charts/atlantis/templates/cluster.yaml +++ b/charts/atlantis/templates/cluster.yaml @@ -66,4 +66,15 @@ spec: - ALTER USER app WITH SUPERUSER; {{- end }} {{- end }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ include "Atlantis.fullname" . }}-db-monitor +spec: + selector: + matchLabels: + cnpg.io/cluster: {{ include "Atlantis.fullname" . }}-db + podMetricsEndpoints: + - port: metrics {{- end }}