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:
commit
f613e66ad6
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user