-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Labels
Description
Hi!
I've just found that litmus ServiceMonitor for metrics collection seems to be misconfigured
I deep dived a bit and it looks like ServiceMonitor selector:
spec:
endpoints:
- path: /metrics
port: http
namespaceSelector:
matchNames:
- litmus
selector:
matchLabels:
app: litmus
app.kubernetes.io/instance: litmus-chaos
app.kubernetes.io/name: litmus
which is resulted in litmus-monitor service (kubernetes service entity).
That has a Pod selector:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: http
selector:
app: litmus
app.kubernetes.io/instance: litmus-chaos
app.kubernetes.io/name: litmus
But this selector covers both litmus and litmus-monitor pods.
But only litmus-monitor-* has port named http at 8080 and serves prometheus metrics
While litmus-* pod has http at 80 with no prometheus metrics. (litmus pods can server default go metrics at 8080 but it's a different story and I don't think that we need this)
name: chaos-operator
ports:
- containerPort: 80
name: http
protocol: TCP
I believe we need to narrow selector to match litmus-monitor only.
Or to allow additionalLables for the selector