use cache size to signal undecorated storage
This commit is contained in:
@@ -39,6 +39,7 @@ func NewHeuristicWatchCacheSizes(expectedRAMCapacityMB int) map[schema.GroupReso
|
||||
watchCacheSizes[schema.GroupResource{Resource: "nodes"}] = maxInt(5*clusterSize, 1000)
|
||||
watchCacheSizes[schema.GroupResource{Resource: "pods"}] = maxInt(50*clusterSize, 1000)
|
||||
watchCacheSizes[schema.GroupResource{Resource: "services"}] = maxInt(5*clusterSize, 1000)
|
||||
watchCacheSizes[schema.GroupResource{Resource: "events"}] = 0
|
||||
watchCacheSizes[schema.GroupResource{Resource: "apiservices", Group: "apiregistration.k8s.io"}] = maxInt(5*clusterSize, 1000)
|
||||
return watchCacheSizes
|
||||
}
|
||||
|
@@ -40,10 +40,6 @@ func NewREST(optsGetter generic.RESTOptionsGetter, ttl uint64) *REST {
|
||||
panic(err) // TODO: Propagate error up
|
||||
}
|
||||
|
||||
// We explicitly do NOT do any decoration here - switching on Cacher
|
||||
// for events will lead to too high memory consumption.
|
||||
opts.Decorator = generic.UndecoratedStorage // TODO use watchCacheSize=-1 to signal UndecoratedStorage
|
||||
|
||||
store := &genericregistry.Store{
|
||||
NewFunc: func() runtime.Object { return &api.Event{} },
|
||||
NewListFunc: func() runtime.Object { return &api.EventList{} },
|
||||
|
Reference in New Issue
Block a user