From c4ff8ae9ca8184a9738ade6fa7688d92905c898f Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Mon, 5 Feb 2018 11:21:00 -0500 Subject: [PATCH] update -o name format to kind.group/name Kubernetes-commit: 765f9ec68b0d0759e64d474f9dfb3bf22c24cadf --- discovery/restmapper.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/discovery/restmapper.go b/discovery/restmapper.go index 6d1de8c1..df5ab035 100644 --- a/discovery/restmapper.go +++ b/discovery/restmapper.go @@ -18,6 +18,7 @@ package discovery import ( "fmt" + "strings" "sync" "k8s.io/apimachinery/pkg/api/meta" @@ -108,6 +109,7 @@ func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.V plural := gv.WithResource(resource.Name) singular := gv.WithResource(resource.SingularName) 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 versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope) }