From a6222521d97c61c47c8631e2e294c96bbfe619f6 Mon Sep 17 00:00:00 2001 From: machine424 Date: Thu, 22 Jan 2026 17:05:45 +0100 Subject: [PATCH] MON-4473: Migrate Prometheus targets discovering from Endpoints to EndpointsSlices --- ...entication-operator_01_prometheusrbac.yaml | 24 +++++++++++++++++++ ...entication-operator_02_servicemonitor.yaml | 3 +++ 2 files changed, 27 insertions(+) diff --git a/manifests/0000_90_cluster-authentication-operator_01_prometheusrbac.yaml b/manifests/0000_90_cluster-authentication-operator_01_prometheusrbac.yaml index e29738b113..53dc365e34 100644 --- a/manifests/0000_90_cluster-authentication-operator_01_prometheusrbac.yaml +++ b/manifests/0000_90_cluster-authentication-operator_01_prometheusrbac.yaml @@ -19,6 +19,14 @@ rules: - get - list - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch --- # Role for accessing metrics exposed by authentication resources apiVersion: rbac.authorization.k8s.io/v1 @@ -41,6 +49,14 @@ rules: - get - list - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch --- # oauth-apiserver role apiVersion: rbac.authorization.k8s.io/v1 @@ -63,6 +79,14 @@ rules: - get - list - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch --- # Grant cluster-monitoring access to cluster-authentication-operator metrics apiVersion: rbac.authorization.k8s.io/v1 diff --git a/manifests/0000_90_cluster-authentication-operator_02_servicemonitor.yaml b/manifests/0000_90_cluster-authentication-operator_02_servicemonitor.yaml index b594ecc392..e47d8ea381 100644 --- a/manifests/0000_90_cluster-authentication-operator_02_servicemonitor.yaml +++ b/manifests/0000_90_cluster-authentication-operator_02_servicemonitor.yaml @@ -29,6 +29,7 @@ spec: selector: matchLabels: app: authentication-operator + serviceDiscoveryRole: EndpointSlice --- # Configure cluster-monitoring for cluster authentication resources apiVersion: monitoring.coreos.com/v1 @@ -60,6 +61,7 @@ spec: selector: matchLabels: app: oauth-openshift + serviceDiscoveryRole: EndpointSlice --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor @@ -113,3 +115,4 @@ spec: selector: matchLabels: app: openshift-oauth-apiserver + serviceDiscoveryRole: EndpointSlice