diff --git a/pkg/templates/charts/toggle/hypershift/templates/hypershift-addon-manager_clusterrole.yaml b/pkg/templates/charts/toggle/hypershift/templates/hypershift-addon-manager_clusterrole.yaml index 34782ce0..54dce7b5 100644 --- a/pkg/templates/charts/toggle/hypershift/templates/hypershift-addon-manager_clusterrole.yaml +++ b/pkg/templates/charts/toggle/hypershift/templates/hypershift-addon-manager_clusterrole.yaml @@ -58,4 +58,7 @@ rules: verbs: ["get", "list", "create", "delete", "update", "patch"] - apiGroups: ["multicluster.openshift.io"] resources: ["multiclusterengines"] - verbs: ["list"] \ No newline at end of file + verbs: ["list"] +- apiGroups: [ "discovery.open-cluster-management.io" ] + resources: [ "discoveredclusters" ] + verbs: ["get", "list", "watch", "create", "update", "delete", "deletecollection", "patch"] \ No newline at end of file diff --git a/pkg/templates/rbac_gen.go b/pkg/templates/rbac_gen.go index f3ed3cc4..6726da21 100644 --- a/pkg/templates/rbac_gen.go +++ b/pkg/templates/rbac_gen.go @@ -241,6 +241,7 @@ package main //+kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;update;create;patch //+kubebuilder:rbac:groups=discovery.open-cluster-management.io,resources=discoveredclusters,verbs=create;delete;deletecollection;get;list;patch;update;watch +//+kubebuilder:rbac:groups=discovery.open-cluster-management.io,resources=discoveredclusters,verbs=get;list;watch;create;update;delete;deletecollection;patch //+kubebuilder:rbac:groups=discovery.open-cluster-management.io,resources=discoveredclusters/finalizers,verbs=get;patch;update //+kubebuilder:rbac:groups=discovery.open-cluster-management.io,resources=discoveredclusters/status,verbs=get;patch;update //+kubebuilder:rbac:groups=discovery.open-cluster-management.io,resources=discoveryconfigs,verbs=create;delete;get;list;patch;update;watch