mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
support included-types-overrides without version provided (group/type)
This commit is contained in:
parent
3ba81a45a9
commit
41b409b24e
@ -58,11 +58,8 @@ func parseGroupVersionType(gvtString string) (gvString string, typeStr string, e
|
|||||||
length := len(subs)
|
length := len(subs)
|
||||||
switch length {
|
switch length {
|
||||||
case 2:
|
case 2:
|
||||||
// handle legacy api group version.
|
// gvtString of the form group/type, e.g. api/Service,extensions/ReplicaSet
|
||||||
if subs[0] == "api" {
|
return subs[0] + "/", subs[1], nil
|
||||||
return "api/", subs[1], nil
|
|
||||||
}
|
|
||||||
return "", "", invalidFormatErr
|
|
||||||
case 3:
|
case 3:
|
||||||
return strings.Join(subs[:length-1], "/"), subs[length-1], nil
|
return strings.Join(subs[:length-1], "/"), subs[length-1], nil
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user