Skip to content

Commit dc09f19

Browse files
committed
feat: migrate core monitoring ServiceMonitors to EndpointSlice
This change sets serviceDiscoveryRole: EndpointSlice on ServiceMonitors for the core Prometheus and Alertmanager components ServiceMonitors migrated: - prometheus-k8s (self-monitoring + thanos-sidecar) - prometheus-user-workload (self-monitoring + thanos-sidecar) - alertmanager-main - alertmanager-user-workload This follows the gradual migration pattern established in PR #2742 and is part of the MON-4216 Epic. Signed-off-by: Daniel Mellado <[email protected]> Signed-off-by: Daniel Mellado <[email protected]>
1 parent aa9190b commit dc09f19

File tree

11 files changed

+13
-1
lines changed

11 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- `KubePdbNotEnoughHealthyPods`
88
- `KubeNodePressure`
99
- `KubeNodeEviction`
10-
- [#2677](https://github.com/openshift/cluster-monitoring-operator/pull/2677) Fix KSM deny-list typo that put `^kube_.+_annotations$^kube_customresource_.+_annotations_info$,` in the deny-list instead of seperate entries, like so, `^kube_.+_annotations$,^kube_customresource_.+_annotations_info$,`, due to the omission of a comma.
10+
- [#2677](https://github.com/openshift/cluster-monitoring-operator/pull/2677) Fix KSM deny-list typo that put `^kube_.+_annotations$^kube_customresource_.+_annotations_info$,` in the deny-list instead of separate entries, like so, `^kube_.+_annotations$,^kube_customresource_.+_annotations_info$,`, due to the omission of a comma.
1111

1212
## 4.18
1313

assets/alertmanager-user-workload/service-monitor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ spec:
2626
app.kubernetes.io/instance: user-workload
2727
app.kubernetes.io/name: alertmanager
2828
app.kubernetes.io/part-of: openshift-monitoring
29+
serviceDiscoveryRole: EndpointSlice

assets/alertmanager/service-monitor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ spec:
2626
app.kubernetes.io/instance: main
2727
app.kubernetes.io/name: alertmanager
2828
app.kubernetes.io/part-of: openshift-monitoring
29+
serviceDiscoveryRole: EndpointSlice

assets/prometheus-k8s/service-monitor-thanos-sidecar.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ spec:
2626
selector:
2727
matchLabels:
2828
app.kubernetes.io/component: thanos-sidecar
29+
serviceDiscoveryRole: EndpointSlice

assets/prometheus-k8s/service-monitor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ spec:
2626
app.kubernetes.io/instance: k8s
2727
app.kubernetes.io/name: prometheus
2828
app.kubernetes.io/part-of: openshift-monitoring
29+
serviceDiscoveryRole: EndpointSlice

assets/prometheus-user-workload/service-monitor-thanos-sidecar.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ spec:
2626
selector:
2727
matchLabels:
2828
app.kubernetes.io/component: thanos-sidecar
29+
serviceDiscoveryRole: EndpointSlice

assets/prometheus-user-workload/service-monitor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ spec:
2626
app.kubernetes.io/instance: user-workload
2727
app.kubernetes.io/name: prometheus
2828
app.kubernetes.io/part-of: openshift-monitoring
29+
serviceDiscoveryRole: EndpointSlice

jsonnet/components/alertmanager-user-workload.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ function(params)
6868

6969
serviceMonitor+: {
7070
spec+: {
71+
serviceDiscoveryRole: 'EndpointSlice',
7172
endpoints: [
7273
{
7374
port: 'metrics',

jsonnet/components/alertmanager.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ function(params)
218218

219219
serviceMonitor+: {
220220
spec+: {
221+
serviceDiscoveryRole: 'EndpointSlice',
221222
endpoints: [
222223
{
223224
port: 'metrics',

jsonnet/components/prometheus-user-workload.libsonnet

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ function(params)
214214

215215
serviceMonitor+: {
216216
spec+: {
217+
serviceDiscoveryRole: 'EndpointSlice',
217218
endpoints: [
218219
{
219220
port: 'metrics',
@@ -241,6 +242,7 @@ function(params)
241242

242243
serviceMonitorThanosSidecar+: {
243244
spec+: {
245+
serviceDiscoveryRole: 'EndpointSlice',
244246
jobLabel:: null,
245247
endpoints: [
246248
{

0 commit comments

Comments
 (0)