Skip to content

add podmonitor #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions helm/postgres/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.podmonitor }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ .Values.name | quote }}
labels:
prometheus: k8s
spec:
podMetricsEndpoints:
- interval: 30s
path: /metrics
targetPort: 9187
selector:
matchLabels:
postgres-operator.crunchydata.com/cluster: {{ .Values.name | quote }}
{{- end }}
1 change: 1 addition & 0 deletions helm/postgres/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# metrics exporter than can be scraped by Prometheus. This defaults to the value
# below.
# monitoring: false
# podmonitor: false

###################
# Image Overrides #
Expand Down