remove duplication of RESTOptionsGetter for kube

This commit is contained in:
deads2k
2017-02-07 14:52:50 -05:00
parent 470cb9d2c9
commit a463540d47
12 changed files with 93 additions and 91 deletions

View File

@@ -315,16 +315,19 @@ func Run(s *options.ServerRunOptions) error {
sets.NewString("watch", "proxy"),
sets.NewString("attach", "exec", "proxy", "log", "portforward"),
)
genericConfig.RESTOptionsGetter = &kubeapiserver.RESTOptionsFactory{
StorageFactory: storageFactory,
EnableWatchCache: s.Etcd.EnableWatchCache,
EnableGarbageCollection: s.Etcd.EnableGarbageCollection,
DeleteCollectionWorkers: s.Etcd.DeleteCollectionWorkers,
}
config := &master.Config{
GenericConfig: genericConfig,
APIResourceConfigSource: storageFactory.APIResourceConfigSource,
StorageFactory: storageFactory,
EnableGarbageCollection: s.Etcd.EnableGarbageCollection,
EnableWatchCache: s.Etcd.EnableWatchCache,
EnableCoreControllers: true,
DeleteCollectionWorkers: s.Etcd.DeleteCollectionWorkers,
EventTTL: s.EventTTL,
KubeletClientConfig: s.KubeletConfig,
EnableUISupport: true,