Skip to content

Commit

Permalink
add PodMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
huehnerhose committed Mar 1, 2024
1 parent c9c8f75 commit 21b1b38
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions charts/pgbouncer/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.pgbouncerExporter.podMonitor -}}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "pgbouncer.fullname" . }}
labels:
{{- include "pgbouncer.selectorLabels" . | nindent 8 }}
spec:
selector:
matchLabels:
{{- include "pgbouncer.selectorLabels" . | nindent 8 }}
podMetricsEndpoints:
- port: exporter
{{- end }}
1 change: 1 addition & 0 deletions charts/pgbouncer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ extraVolumes: []
##
pgbouncerExporter:
enabled: false
podMonitor: true
port: 9127
image:
registry: ""
Expand Down

0 comments on commit 21b1b38

Please sign in to comment.