mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-02 07:35:21 +00:00
Fixes bug with Root not handling Group without Version
Kubernetes-commit: 17cd59ec1cf5c0a83d52bc94995025e802f1a123
This commit is contained in:
committed by
Kubernetes Publisher
parent
91199a69ee
commit
6ddf61b8c1
@@ -157,6 +157,10 @@ func pathToGroupVersion(path string) (schema.GroupVersion, error) {
|
||||
}
|
||||
apiPrefix := parts[0]
|
||||
if apiPrefix == "apis" {
|
||||
// Example: apis/apps (without version)
|
||||
if len(parts) < 3 {
|
||||
return gv, fmt.Errorf("Group without Version not allowed")
|
||||
}
|
||||
gv.Group = parts[1]
|
||||
gv.Version = parts[2]
|
||||
} else if apiPrefix == "api" {
|
||||
|
Reference in New Issue
Block a user