Commit f613e66a authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #44543 from xilabao/fix-warning-in-auth

Automatic merge from submit-queue remove warning infomation when using '*' ``` #kubectl auth can-i "*" "*" Warning: the server doesn't have a resource type '*' yes ```
parents 5899cfa4 d3d33aa8
......@@ -180,6 +180,10 @@ func (o *CanIOptions) RunAccessCheck() (bool, error) {
}
func (o *CanIOptions) resourceFor(mapper meta.RESTMapper, resourceArg string) schema.GroupVersionResource {
if resourceArg == "*" {
return schema.GroupVersionResource{Resource: resourceArg}
}
fullySpecifiedGVR, groupResource := schema.ParseResourceArg(strings.ToLower(resourceArg))
gvr := schema.GroupVersionResource{}
if fullySpecifiedGVR != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment