mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
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:
@@ -180,6 +180,10 @@ func (o *CanIOptions) RunAccessCheck() (bool, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *CanIOptions) resourceFor(mapper meta.RESTMapper, resourceArg string) schema.GroupVersionResource {
|
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))
|
fullySpecifiedGVR, groupResource := schema.ParseResourceArg(strings.ToLower(resourceArg))
|
||||||
gvr := schema.GroupVersionResource{}
|
gvr := schema.GroupVersionResource{}
|
||||||
if fullySpecifiedGVR != nil {
|
if fullySpecifiedGVR != nil {
|
||||||
|
Reference in New Issue
Block a user