From 973c12ee56ce3d85c2498f8e141238c05f9084f0 Mon Sep 17 00:00:00 2001 From: machine424 Date: Mon, 9 Feb 2026 10:57:31 +0100 Subject: [PATCH] chore: add permissions on endpointslice to Prometheus Role and use serviceDiscoveryRole: EndpointSlice in ServiceMonitors --- assets/csidriveroperators/vsphere/12_servicemonitor.yaml | 1 + assets/csidriveroperators/vsphere/13_prometheus_role.yaml | 8 ++++++++ assets/vsphere_problem_detector/11_service_monitor.yaml | 1 + ...000_90_cluster-storage-operator_01_prometheusrbac.yaml | 8 ++++++++ ...000_90_cluster-storage-operator_02_servicemonitor.yaml | 1 + 5 files changed, 19 insertions(+) diff --git a/assets/csidriveroperators/vsphere/12_servicemonitor.yaml b/assets/csidriveroperators/vsphere/12_servicemonitor.yaml index b9688e614..c8efff1db 100644 --- a/assets/csidriveroperators/vsphere/12_servicemonitor.yaml +++ b/assets/csidriveroperators/vsphere/12_servicemonitor.yaml @@ -18,3 +18,4 @@ spec: selector: matchLabels: app: vmware-vsphere-csi-driver-operator-metrics + serviceDiscoveryRole: EndpointSlice diff --git a/assets/csidriveroperators/vsphere/13_prometheus_role.yaml b/assets/csidriveroperators/vsphere/13_prometheus_role.yaml index be3f5a736..e498c1d9f 100644 --- a/assets/csidriveroperators/vsphere/13_prometheus_role.yaml +++ b/assets/csidriveroperators/vsphere/13_prometheus_role.yaml @@ -15,3 +15,11 @@ rules: - get - list - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch diff --git a/assets/vsphere_problem_detector/11_service_monitor.yaml b/assets/vsphere_problem_detector/11_service_monitor.yaml index bf8784d02..2a6317f77 100644 --- a/assets/vsphere_problem_detector/11_service_monitor.yaml +++ b/assets/vsphere_problem_detector/11_service_monitor.yaml @@ -18,3 +18,4 @@ spec: selector: matchLabels: app: vsphere-problem-detector-metrics + serviceDiscoveryRole: EndpointSlice diff --git a/manifests/0000_90_cluster-storage-operator_01_prometheusrbac.yaml b/manifests/0000_90_cluster-storage-operator_01_prometheusrbac.yaml index 0366d6664..7cd59683e 100644 --- a/manifests/0000_90_cluster-storage-operator_01_prometheusrbac.yaml +++ b/manifests/0000_90_cluster-storage-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 openshift-cluster-storage-operator metrics apiVersion: rbac.authorization.k8s.io/v1 diff --git a/manifests/0000_90_cluster-storage-operator_02_servicemonitor.yaml b/manifests/0000_90_cluster-storage-operator_02_servicemonitor.yaml index 0dbe44390..025c0252c 100644 --- a/manifests/0000_90_cluster-storage-operator_02_servicemonitor.yaml +++ b/manifests/0000_90_cluster-storage-operator_02_servicemonitor.yaml @@ -25,3 +25,4 @@ spec: selector: matchLabels: app: cluster-storage-operator-metrics + serviceDiscoveryRole: EndpointSlice