Exlude stateuful service objects to prevent double scrapes

This commit is contained in:
Stefan Reimer 2020-08-15 14:45:43 +01:00
parent dd8337660f
commit bef01e96ab

View File

@ -19,6 +19,9 @@ spec:
port: http port: http
path: /_prometheus/metrics path: /_prometheus/metrics
selector: selector:
matchExpressions:
key: elasticsearch.k8s.elastic.co/statefulset-name
operator: DoesNotExist
matchLabels: matchLabels:
common.k8s.elastic.co/type: elasticsearch common.k8s.elastic.co/type: elasticsearch
elasticsearch.k8s.elastic.co/cluster-name: {{ template "kubezero-lib.fullname" $ }} elasticsearch.k8s.elastic.co/cluster-name: {{ template "kubezero-lib.fullname" $ }}