Merge pull request #59353 from juanvallejo/jvallejo/update-name-printer-output

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update name printer output to kind.group/name

**Release note**:
```release-note
NONE
```

Followup to https://github.com/kubernetes/kubernetes/pull/59227

Updates output via `-o name` to be pipeable.

cc @deads2k

Kubernetes-commit: bb500a73b618b40e8e5ef0955861183ebd325259
This commit is contained in:
Kubernetes Publisher 2018-02-15 10:37:19 -08:00
commit e00c8f23c0
2 changed files with 55 additions and 53 deletions

106
Godeps/Godeps.json generated
View File

@ -400,215 +400,215 @@
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "cced8e64b6ca92a8b6afcbfea3353ca016694a45"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",

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