Skip to content

Commit

Permalink
feat: add serviceMonitor in the helm chart (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamYSF committed Jun 13, 2024
1 parent 666d4bb commit 2ba9c11
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions helm/api-testing/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "api-testing.fullname" . }}-servicemonitor
labels:
{{- include "api-testing.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "api-testing.selectorLabels" . | nindent 6 }}
endpoints:
- port: http
interval: {{ .Values.serviceMonitor.interval }}
path: /metrics
{{- end }}
4 changes: 4 additions & 0 deletions helm/api-testing/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,7 @@ affinity: {}

mongodb:
enabled: false

serviceMonitor:
enabled: false
interval: 15s

0 comments on commit 2ba9c11

Please sign in to comment.