From 0045d565747c6b3057362ddfbf37caacf2940dea Mon Sep 17 00:00:00 2001 From: machine424 Date: Mon, 9 Feb 2026 11:08:59 +0100 Subject: [PATCH] chore: add permissions on endpointslice to Prometheus Role and use serviceDiscoveryRole: EndpointSlice in ServiceMonitors --- manifests/0000_90_console-operator_01_prometheusrbac.yaml | 8 ++++++++ manifests/0000_90_console-operator_02_servicemonitor.yaml | 1 + manifests/0000_90_console_01_prometheusrbac.yaml | 8 ++++++++ manifests/0000_90_console_02_servicemonitor.yaml | 1 + 4 files changed, 18 insertions(+) diff --git a/manifests/0000_90_console-operator_01_prometheusrbac.yaml b/manifests/0000_90_console-operator_01_prometheusrbac.yaml index ec6caabd46..f04459f361 100644 --- a/manifests/0000_90_console-operator_01_prometheusrbac.yaml +++ b/manifests/0000_90_console-operator_01_prometheusrbac.yaml @@ -21,6 +21,14 @@ rules: - get - list - watch + - apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch --- # Grant cluster-monitoring access to console-operator metrics apiVersion: rbac.authorization.k8s.io/v1 diff --git a/manifests/0000_90_console-operator_02_servicemonitor.yaml b/manifests/0000_90_console-operator_02_servicemonitor.yaml index 44623c7465..80836e479d 100644 --- a/manifests/0000_90_console-operator_02_servicemonitor.yaml +++ b/manifests/0000_90_console-operator_02_servicemonitor.yaml @@ -26,4 +26,5 @@ spec: selector: matchLabels: name: console-operator + serviceDiscoveryRole: EndpointSlice diff --git a/manifests/0000_90_console_01_prometheusrbac.yaml b/manifests/0000_90_console_01_prometheusrbac.yaml index a905a63ef7..f833071044 100644 --- a/manifests/0000_90_console_01_prometheusrbac.yaml +++ b/manifests/0000_90_console_01_prometheusrbac.yaml @@ -21,6 +21,14 @@ rules: - get - list - watch + - apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch --- # Grant cluster-monitoring access to console metrics apiVersion: rbac.authorization.k8s.io/v1 diff --git a/manifests/0000_90_console_02_servicemonitor.yaml b/manifests/0000_90_console_02_servicemonitor.yaml index ff0080b7c7..bdd6a49fda 100644 --- a/manifests/0000_90_console_02_servicemonitor.yaml +++ b/manifests/0000_90_console_02_servicemonitor.yaml @@ -26,3 +26,4 @@ spec: selector: matchLabels: app: console + serviceDiscoveryRole: EndpointSlice