From b6863246e89d619a4713e0ee044c535939b88f1a Mon Sep 17 00:00:00 2001 From: Jian Qiu Date: Thu, 2 Jul 2020 08:53:31 +0800 Subject: [PATCH] Clusterrole on hub should be able to monitor manifestworks --- .../cluster-manager-registration-clusterrole.yaml | 4 ++++ pkg/operators/clustermanager/bindata/bindata.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/manifests/cluster-manager/cluster-manager-registration-clusterrole.yaml b/manifests/cluster-manager/cluster-manager-registration-clusterrole.yaml index e4fecb0ef..47ed472bf 100644 --- a/manifests/cluster-manager/cluster-manager-registration-clusterrole.yaml +++ b/manifests/cluster-manager/cluster-manager-registration-clusterrole.yaml @@ -38,3 +38,7 @@ rules: - apiGroups: ["cluster.open-cluster-management.io"] resources: ["managedclusters/status"] verbs: ["update", "patch"] +# Allow hub to monitor manifestworks +- apiGroups: ["work.open-cluster-management.io"] + resources: ["manifestworks"] + verbs: ["get", "list", "watch"] diff --git a/pkg/operators/clustermanager/bindata/bindata.go b/pkg/operators/clustermanager/bindata/bindata.go index 1396af6b2..bc8bc5ff0 100644 --- a/pkg/operators/clustermanager/bindata/bindata.go +++ b/pkg/operators/clustermanager/bindata/bindata.go @@ -582,6 +582,10 @@ rules: - apiGroups: ["cluster.open-cluster-management.io"] resources: ["managedclusters/status"] verbs: ["update", "patch"] +# Allow hub to monitor manifestworks +- apiGroups: ["work.open-cluster-management.io"] + resources: ["manifestworks"] + verbs: ["get", "list", "watch"] `) func manifestsClusterManagerClusterManagerRegistrationClusterroleYamlBytes() ([]byte, error) {