kubeadm: fix uninvalid namespace field for clusterrole
Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
@@ -56,7 +56,6 @@ func AllowBoostrapTokensToGetNodes(client clientset.Interface) error {
|
|||||||
if err := apiclient.CreateOrUpdateClusterRole(client, &rbac.ClusterRole{
|
if err := apiclient.CreateOrUpdateClusterRole(client, &rbac.ClusterRole{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: constants.GetNodesClusterRoleName,
|
Name: constants.GetNodesClusterRoleName,
|
||||||
Namespace: metav1.NamespaceSystem,
|
|
||||||
},
|
},
|
||||||
Rules: []rbac.PolicyRule{
|
Rules: []rbac.PolicyRule{
|
||||||
{
|
{
|
||||||
@@ -72,7 +71,6 @@ func AllowBoostrapTokensToGetNodes(client clientset.Interface) error {
|
|||||||
return apiclient.CreateOrUpdateClusterRoleBinding(client, &rbac.ClusterRoleBinding{
|
return apiclient.CreateOrUpdateClusterRoleBinding(client, &rbac.ClusterRoleBinding{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: constants.GetNodesClusterRoleName,
|
Name: constants.GetNodesClusterRoleName,
|
||||||
Namespace: metav1.NamespaceSystem,
|
|
||||||
},
|
},
|
||||||
RoleRef: rbac.RoleRef{
|
RoleRef: rbac.RoleRef{
|
||||||
APIGroup: rbac.GroupName,
|
APIGroup: rbac.GroupName,
|
||||||
|
Reference in New Issue
Block a user