Skip to content

Commit

Permalink
Merge pull request #253 from weaviate/improve_servicemonitor
Browse files Browse the repository at this point in the history
Add label to weaviate service for monitoring.
  • Loading branch information
jfrancoa authored Aug 2, 2024
2 parents 7ddcbbb + e2e0e9d commit 858ae40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions weaviate/templates/weaviateService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
labels:
app.kubernetes.io/name: weaviate
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if and .Values.env.PROMETHEUS_MONITORING_ENABLED .Values.serviceMonitor.enabled }}
monitoring: enabled
{{- end }}
{{- with .Values.service.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions weaviate/templates/weaviateServiceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
matchLabels:
app.kubernetes.io/name: weaviate
app.kubernetes.io/managed-by: {{ .Release.Service }}
monitoring: enabled
namespaceSelector:
matchNames:
- {{ .Release.Namespace | quote }}
Expand Down
2 changes: 2 additions & 0 deletions weaviate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ grpcService:

# The service monitor defines prometheus monitoring for a set of services
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ServiceMonitor
# Make sure to set the following prometheus values if deploying observability with the kube-prometheus-stack helm chart:
# - prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues: false
serviceMonitor:
enabled: false
interval: 30s
Expand Down

0 comments on commit 858ae40

Please sign in to comment.