From 319f5b280a5e21446b322a51fe1ace01fd37e681 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 22 Mar 2015 18:48:39 -0400 Subject: [PATCH] Not all Kinds should be registered to RESTMapper --- pkg/api/latest/latest.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/api/latest/latest.go b/pkg/api/latest/latest.go index f46d153a4d9..92f88de9149 100644 --- a/pkg/api/latest/latest.go +++ b/pkg/api/latest/latest.go @@ -26,6 +26,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2" "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3" "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" + "github.com/GoogleCloudPlatform/kubernetes/pkg/util" ) // Version is the string that represents the current external default version. @@ -122,9 +123,15 @@ func init() { "Namespace": true, } + // these kinds should be excluded from the list of resources + ignoredKinds := util.NewStringSet("ListOptions", "DeleteOptions", "Status", "ContainerManifest") + // enumerate all supported versions, get the kinds, and register with the mapper how to address our resources for _, version := range versions { for kind := range api.Scheme.KnownTypes(version) { + if ignoredKinds.Has(kind) { + continue + } mixedCase, found := versionMixedCase[version] if !found { mixedCase = false