disable GC for custom resources

pull/6/head
deads2k 2017-06-13 10:40:58 -04:00
parent 5d2dbb58d7
commit 1da8f67560
1 changed files with 7 additions and 5 deletions

View File

@ -105,11 +105,13 @@ func (o CustomResourceDefinitionsServerOptions) Config() (*apiserver.Config, err
func NewCRDRESTOptionsGetter(etcdOptions genericoptions.EtcdOptions) genericregistry.RESTOptionsGetter {
ret := apiserver.CRDRESTOptionsGetter{
StorageConfig: etcdOptions.StorageConfig,
StoragePrefix: etcdOptions.StorageConfig.Prefix,
EnableWatchCache: etcdOptions.EnableWatchCache,
DefaultWatchCacheSize: etcdOptions.DefaultWatchCacheSize,
EnableGarbageCollection: etcdOptions.EnableGarbageCollection,
StorageConfig: etcdOptions.StorageConfig,
StoragePrefix: etcdOptions.StorageConfig.Prefix,
EnableWatchCache: etcdOptions.EnableWatchCache,
DefaultWatchCacheSize: etcdOptions.DefaultWatchCacheSize,
// garbage collection for custom resources is forced off until GC works with CRs.
// When GC is enabled, this turns back into etcdOptions.EnableGarbageCollection
EnableGarbageCollection: false,
DeleteCollectionWorkers: etcdOptions.DeleteCollectionWorkers,
}
ret.StorageConfig.Codec = unstructured.UnstructuredJSONScheme