From 12a21ecffd40f0c977b7a91dddcfeeb60391d74c Mon Sep 17 00:00:00 2001 From: Roke Jung Date: Tue, 7 May 2024 13:59:52 -0400 Subject: [PATCH] ACM-11470: Allow DiscoveredCluster (#699) * ACM-11470: Allow DiscoveredCluster Signed-off-by: Roke Jung * ran go generate Signed-off-by: Roke Jung --------- Signed-off-by: Roke Jung --- .../templates/hypershift-addon-manager_clusterrole.yaml | 5 ++++- pkg/templates/rbac_gen.go | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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