Skip to content

Commit

Permalink
Add podMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
wpjunior committed Jul 12, 2021
1 parent 3bfcb9b commit 5e2ce1a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/gcp-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.8
version: 0.1.9

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
15 changes: 15 additions & 0 deletions charts/gcp-state-metrics/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.prometheus.servicemonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "gcp-state-metrics.fullname" . }}
labels:
{{- include "gcp-state-metrics.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "gcp-state-metrics.selectorLabels" . | nindent 6 }}
podMetricsEndpoints:
- port: http
scheme: http
{{- end }}
4 changes: 4 additions & 0 deletions charts/gcp-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

prometheus:
servicemonitor:
enabled: false

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down

0 comments on commit 5e2ce1a

Please sign in to comment.