mirror of https://github.com/k3s-io/k3s
fix forbid clusterrole with namespace
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