Merge pull request #94363 from mborsz/patch-13

Add WatchListPageSize to cache.Config

Kubernetes-commit: c06bc2f6e9fe0aefea2f5b8804cdb68c7c52dfc8
This commit is contained in:
Kubernetes Publisher 2020-09-07 00:13:41 -07:00
commit 23fa3f5256

View File

@ -72,6 +72,9 @@ type Config struct {
// Called whenever the ListAndWatch drops the connection with an error. // Called whenever the ListAndWatch drops the connection with an error.
WatchErrorHandler WatchErrorHandler WatchErrorHandler WatchErrorHandler
// WatchListPageSize is the requested chunk size of initial and relist watch lists.
WatchListPageSize int64
} }
// ShouldResyncFunc is a type of function that indicates if a reflector should perform a // ShouldResyncFunc is a type of function that indicates if a reflector should perform a
@ -134,6 +137,7 @@ func (c *controller) Run(stopCh <-chan struct{}) {
c.config.FullResyncPeriod, c.config.FullResyncPeriod,
) )
r.ShouldResync = c.config.ShouldResync r.ShouldResync = c.config.ShouldResync
r.WatchListPageSize = c.config.WatchListPageSize
r.clock = c.clock r.clock = c.clock
if c.config.WatchErrorHandler != nil { if c.config.WatchErrorHandler != nil {
r.watchErrorHandler = c.config.WatchErrorHandler r.watchErrorHandler = c.config.WatchErrorHandler