Merge pull request #21744 from ethernetdan/defaultrestmapper-pkg-path-check

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2016-03-01 04:25:23 -08:00
commit 47fda638b6

View File

@ -43,10 +43,10 @@ func NewDefaultRESTMapper(defaultGroupVersions []unversioned.GroupVersion, inter
for _, gv := range defaultGroupVersions {
for kind, oType := range Scheme.KnownTypes(gv) {
gvk := gv.WithKind(kind)
// TODO: Remove import path prefix check.
// We check the import path prefix because we currently stuff both "api" and "extensions" objects
// TODO: Remove import path check.
// We check the import path because we currently stuff both "api" and "extensions" objects
// into the same group within Scheme since Scheme has no notion of groups yet.
if !strings.HasPrefix(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) {
if !strings.Contains(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) {
continue
}
scope := meta.RESTScopeNamespace