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
```
This commit is contained in:
Kubernetes Submit Queue 2017-04-21 10:12:56 -07:00 committed by GitHub
commit f613e66ad6

View File

@ -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 {