From 6fe0e8f36adc60f37f4db02e9104766cc99ee8e8 Mon Sep 17 00:00:00 2001 From: Rana Tarek Hassan Date: Wed, 6 Sep 2023 19:02:21 +0300 Subject: [PATCH] Remove cluster role with name cluster-admin check --- pkg/cluster/connector/service_account.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/cluster/connector/service_account.go b/pkg/cluster/connector/service_account.go index 7d89c298a..e67037f38 100644 --- a/pkg/cluster/connector/service_account.go +++ b/pkg/cluster/connector/service_account.go @@ -27,13 +27,7 @@ func ReconcileServiceAccount(ctx context.Context, client kubernetes.Interface, c return nil, err } - // verify cluster role exists clusterRoleName := "cluster-admin" - _, err = client.RbacV1().ClusterRoles().Get(ctx, clusterRoleName, metav1.GetOptions{}) - if err != nil { - return nil, err - } - err = createClusterRoleBinding(ctx, client, clusterRoleName, clusterConnectionOpts) if err != nil { return nil, err