mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-25 06:31:35 +00:00
update -o name format to kind.group/name
Kubernetes-commit: 765f9ec68b0d0759e64d474f9dfb3bf22c24cadf
This commit is contained in:
parent
3bf59c62ad
commit
c4ff8ae9ca
@ -18,6 +18,7 @@ package discovery
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/api/meta"
|
"k8s.io/apimachinery/pkg/api/meta"
|
||||||
@ -108,6 +109,7 @@ func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.V
|
|||||||
plural := gv.WithResource(resource.Name)
|
plural := gv.WithResource(resource.Name)
|
||||||
singular := gv.WithResource(resource.SingularName)
|
singular := gv.WithResource(resource.SingularName)
|
||||||
versionMapper.AddSpecific(gv.WithKind(resource.Kind), plural, singular, scope)
|
versionMapper.AddSpecific(gv.WithKind(resource.Kind), plural, singular, scope)
|
||||||
|
versionMapper.AddSpecific(gv.WithKind(strings.ToLower(resource.Kind)), plural, singular, scope)
|
||||||
// TODO this is producing unsafe guesses that don't actually work, but it matches previous behavior
|
// TODO this is producing unsafe guesses that don't actually work, but it matches previous behavior
|
||||||
versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope)
|
versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user