Skip to content

Commit

Permalink
feat: Add ServiceMonitor object to opensearch
Browse files Browse the repository at this point in the history
chore: use name

Signed-off-by: Shubham Gupta <[email protected]>
  • Loading branch information
shubham-cmyk committed Apr 26, 2024
1 parent 0e215f0 commit ca00d92
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions charts/opensearch/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "opensearch.name" . }}-service-monitor
namespace: {{ .Release.Namespace }}
labels:
{{- include "opensearch.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "opensearch.labels" . | nindent 4 }}
endpoints:
- port: {{ .Values.metricsPort }}
interval: {{ .Values.serviceMonitor.interval }}
path: {{ .Values.serviceMonitor.path }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -529,3 +529,9 @@ extraObjects: []
# selector:
# matchLabels:
# {{- include "opensearch.selectorLabels" . | nindent 6 }}


serviceMonitor:
enabled: false
path: /metrics
interval: 10s

0 comments on commit ca00d92

Please sign in to comment.