mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
fix forbid clusterrole with namespace
This commit is contained in:
parent
d8fa6a99a2
commit
b346911299
@ -1749,6 +1749,9 @@ func printRoleBindingList(list *rbac.RoleBindingList, w io.Writer, options Print
|
||||
}
|
||||
|
||||
func printClusterRole(clusterRole *rbac.ClusterRole, w io.Writer, options PrintOptions) error {
|
||||
if options.WithNamespace {
|
||||
return fmt.Errorf("clusterRole is not namespaced")
|
||||
}
|
||||
return printObjectMeta(clusterRole.ObjectMeta, w, options, false)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user