mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 13:02:14 +00:00
kubeadm: fix uninvalid namespace field for clusterrole
Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
parent
8e8ac86cf1
commit
6732c4110f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user