From 169a20169ac5bab3a74f6a1bfe60916186dac4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Ma=C5=88=C3=A1k?= Date: Wed, 12 Nov 2025 17:44:01 +0100 Subject: [PATCH] Add ClusterRole to ClusterOperator relatedObjects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds the cloud-controller-manager ClusterRole to the ClusterOperator's relatedObjects to ensure it's collected by oc adm inspect and must-gather for debugging purposes. The name field is set to the specific ClusterRole name since the operator manages a single ClusterRole resource. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- ...6_cloud-controller-manager-operator_12_clusteroperator.yaml | 3 +++ pkg/controllers/status.go | 1 + 2 files changed, 4 insertions(+) diff --git a/manifests/0000_26_cloud-controller-manager-operator_12_clusteroperator.yaml b/manifests/0000_26_cloud-controller-manager-operator_12_clusteroperator.yaml index 18ca4d325..b2c7112ce 100644 --- a/manifests/0000_26_cloud-controller-manager-operator_12_clusteroperator.yaml +++ b/manifests/0000_26_cloud-controller-manager-operator_12_clusteroperator.yaml @@ -22,3 +22,6 @@ status: - group: "" name: openshift-cloud-controller-manager-operator resource: namespaces + - group: rbac.authorization.k8s.io + name: cloud-controller-manager + resource: clusterroles diff --git a/pkg/controllers/status.go b/pkg/controllers/status.go index 46dfbc1d5..73e3c9cdf 100644 --- a/pkg/controllers/status.go +++ b/pkg/controllers/status.go @@ -207,6 +207,7 @@ func (r *ClusterOperatorStatusClient) relatedObjects() []configv1.ObjectReferenc {Resource: "namespaces", Name: defaultManagementNamespace}, {Group: configv1.GroupName, Resource: "clusteroperators", Name: clusterOperatorName}, {Resource: "namespaces", Name: r.ManagedNamespace}, + {Group: "rbac.authorization.k8s.io", Resource: "clusterroles", Name: clusterOperatorName}, } }