update -o name format to kind.group/name

Kubernetes-commit: 765f9ec68b0d0759e64d474f9dfb3bf22c24cadf
This commit is contained in:
juanvallejo 2018-02-05 11:21:00 -05:00 committed by Kubernetes Publisher
parent 3bf59c62ad
commit c4ff8ae9ca

View File

@ -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)
}