Merge pull request #121239 from my-git9/fix

kubeadm: fix unnecessary namespace field for clusterrole
This commit is contained in:
Kubernetes Prow Robot 2023-10-16 04:30:54 +02:00 committed by GitHub
commit 6897b1225d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,8 +55,7 @@ func AllowBoostrapTokensToGetNodes(client clientset.Interface) error {
if err := apiclient.CreateOrUpdateClusterRole(client, &rbac.ClusterRole{
ObjectMeta: metav1.ObjectMeta{
Name: constants.GetNodesClusterRoleName,
Namespace: metav1.NamespaceSystem,
Name: constants.GetNodesClusterRoleName,
},
Rules: []rbac.PolicyRule{
{
@ -71,8 +70,7 @@ func AllowBoostrapTokensToGetNodes(client clientset.Interface) error {
return apiclient.CreateOrUpdateClusterRoleBinding(client, &rbac.ClusterRoleBinding{
ObjectMeta: metav1.ObjectMeta{
Name: constants.GetNodesClusterRoleName,
Namespace: metav1.NamespaceSystem,
Name: constants.GetNodesClusterRoleName,
},
RoleRef: rbac.RoleRef{
APIGroup: rbac.GroupName,