disable GC for custom resources
This commit is contained in:
		@@ -105,11 +105,13 @@ func (o CustomResourceDefinitionsServerOptions) Config() (*apiserver.Config, err
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func NewCRDRESTOptionsGetter(etcdOptions genericoptions.EtcdOptions) genericregistry.RESTOptionsGetter {
 | 
					func NewCRDRESTOptionsGetter(etcdOptions genericoptions.EtcdOptions) genericregistry.RESTOptionsGetter {
 | 
				
			||||||
	ret := apiserver.CRDRESTOptionsGetter{
 | 
						ret := apiserver.CRDRESTOptionsGetter{
 | 
				
			||||||
		StorageConfig:           etcdOptions.StorageConfig,
 | 
							StorageConfig:         etcdOptions.StorageConfig,
 | 
				
			||||||
		StoragePrefix:           etcdOptions.StorageConfig.Prefix,
 | 
							StoragePrefix:         etcdOptions.StorageConfig.Prefix,
 | 
				
			||||||
		EnableWatchCache:        etcdOptions.EnableWatchCache,
 | 
							EnableWatchCache:      etcdOptions.EnableWatchCache,
 | 
				
			||||||
		DefaultWatchCacheSize:   etcdOptions.DefaultWatchCacheSize,
 | 
							DefaultWatchCacheSize: etcdOptions.DefaultWatchCacheSize,
 | 
				
			||||||
		EnableGarbageCollection: etcdOptions.EnableGarbageCollection,
 | 
							// 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,
 | 
							DeleteCollectionWorkers: etcdOptions.DeleteCollectionWorkers,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	ret.StorageConfig.Codec = unstructured.UnstructuredJSONScheme
 | 
						ret.StorageConfig.Codec = unstructured.UnstructuredJSONScheme
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user