mirror of
https://github.com/outbackdingo/qdrant-helm.git
synced 2026-01-27 10:20:18 +00:00
Apply additional label to headless Service + ServiceMonitor to avoid duplicate scraping (#214)
Add a common label `app.kubernetes.io/component` ([1]) with value `cluster-discovery` to the headless Service and the ServiceMonitor it's ensured metrics are only scraped once. Using the headless service also makes the most sense, as it has the sole purpose of discovering all Pods making up a qdrant cluster. With `publishNotReadyAddresses: true` metrics are also collected from non-ready pods, see [2]. This is helpful to also collect metrics from Pods that might never become ready to use them for e.g. alerting and problem analysis [1] https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels [2] https://github.com/prometheus-operator/prometheus-operator/discussions/5693 Fixes: #207
This commit is contained in:
committed by
GitHub
parent
0d78af2b99
commit
c9e613ae2e
@@ -4,6 +4,7 @@ metadata:
|
||||
name: {{ include "qdrant.fullname" . }}-headless
|
||||
labels:
|
||||
{{- include "qdrant.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: cluster-discovery
|
||||
{{- with .Values.service.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -40,4 +40,5 @@ spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "qdrant.labels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: cluster-discovery
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user