feat: add serviceMonitor in the helm chart (#485)

This commit is contained in:
SamYSF 2024-06-13 17:56:01 +08:00 committed by GitHub
parent 666d4bbb8a
commit 2ba9c11413
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View File

@ -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 }}

View File

@ -109,3 +109,7 @@ affinity: {}
mongodb:
enabled: false
serviceMonitor:
enabled: false
interval: 15s