fix forbid clusterrole with namespace

pull/6/head
xilabao 2016-11-08 16:25:33 +08:00
parent d8fa6a99a2
commit b346911299
1 changed files with 3 additions and 0 deletions

View File

@ -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)
}