move category expansion out of restmapper

This commit is contained in:
deads2k
2017-03-24 08:02:10 -04:00
parent f4986235c7
commit 8895f314b4
51 changed files with 298 additions and 245 deletions

View File

@@ -83,9 +83,6 @@ func enableVersions(externalVersions []schema.GroupVersion) error {
return nil
}
// userResources is a group of resources mostly used by a kubectl user
var userResources = []string{"svc"}
func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper {
// the list of kinds that are scoped at the root of the api hierarchy
// if a kind is not enumerated here, it is assumed to have a namespace scope
@@ -100,8 +97,6 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper {
"Status")
mapper := meta.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, core.Scheme)
// setup aliases for groups of resources
mapper.AddResourceAlias("all", userResources...)
return mapper
}