mirror of https://github.com/k3s-io/k3s
apiextensions-apiserver: wire through CountMetricPollPeriod for CRs
parent
5232ad4a00
commit
bb8dcc3063
|
@ -664,6 +664,7 @@ type CRDRESTOptionsGetter struct {
|
||||||
DefaultWatchCacheSize int
|
DefaultWatchCacheSize int
|
||||||
EnableGarbageCollection bool
|
EnableGarbageCollection bool
|
||||||
DeleteCollectionWorkers int
|
DeleteCollectionWorkers int
|
||||||
|
CountMetricPollPeriod time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t CRDRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource) (generic.RESTOptions, error) {
|
func (t CRDRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource) (generic.RESTOptions, error) {
|
||||||
|
@ -673,6 +674,7 @@ func (t CRDRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource) (gen
|
||||||
EnableGarbageCollection: t.EnableGarbageCollection,
|
EnableGarbageCollection: t.EnableGarbageCollection,
|
||||||
DeleteCollectionWorkers: t.DeleteCollectionWorkers,
|
DeleteCollectionWorkers: t.DeleteCollectionWorkers,
|
||||||
ResourcePrefix: resource.Group + "/" + resource.Resource,
|
ResourcePrefix: resource.Group + "/" + resource.Resource,
|
||||||
|
CountMetricPollPeriod: t.CountMetricPollPeriod,
|
||||||
}
|
}
|
||||||
if t.EnableWatchCache {
|
if t.EnableWatchCache {
|
||||||
ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize)
|
ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize)
|
||||||
|
|
|
@ -108,6 +108,7 @@ func NewCRDRESTOptionsGetter(etcdOptions genericoptions.EtcdOptions) genericregi
|
||||||
DefaultWatchCacheSize: etcdOptions.DefaultWatchCacheSize,
|
DefaultWatchCacheSize: etcdOptions.DefaultWatchCacheSize,
|
||||||
EnableGarbageCollection: etcdOptions.EnableGarbageCollection,
|
EnableGarbageCollection: etcdOptions.EnableGarbageCollection,
|
||||||
DeleteCollectionWorkers: etcdOptions.DeleteCollectionWorkers,
|
DeleteCollectionWorkers: etcdOptions.DeleteCollectionWorkers,
|
||||||
|
CountMetricPollPeriod: etcdOptions.StorageConfig.CountMetricPollPeriod,
|
||||||
}
|
}
|
||||||
ret.StorageConfig.Codec = unstructured.UnstructuredJSONScheme
|
ret.StorageConfig.Codec = unstructured.UnstructuredJSONScheme
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue