Fix NotFound errors do not line up with API endpoint's group version

This commit is contained in:
Shiyang Wang
2017-07-19 10:15:21 +08:00
parent c75d3028dd
commit 2eda19da7b
46 changed files with 403 additions and 297 deletions

View File

@@ -61,12 +61,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against replication controllers.
func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST) {
store := &genericregistry.Store{
Copier: api.Scheme,
NewFunc: func() runtime.Object { return &api.ReplicationController{} },
NewListFunc: func() runtime.Object { return &api.ReplicationControllerList{} },
PredicateFunc: replicationcontroller.MatchController,
QualifiedResource: api.Resource("replicationcontrollers"),
WatchCacheSize: cachesize.GetWatchCacheSizeByResource("replicationcontrollers"),
Copier: api.Scheme,
NewFunc: func() runtime.Object { return &api.ReplicationController{} },
NewListFunc: func() runtime.Object { return &api.ReplicationControllerList{} },
PredicateFunc: replicationcontroller.MatchController,
DefaultQualifiedResource: api.Resource("replicationcontrollers"),
WatchCacheSize: cachesize.GetWatchCacheSizeByResource("replicationcontrollers"),
CreateStrategy: replicationcontroller.Strategy,
UpdateStrategy: replicationcontroller.Strategy,