Skip to content

Commit 43f5afe

Browse files
committed
Add WatchListPageSize to cache.Config
Currently there is no way to specify WatchListPageSize used by Controller. This PR adds a field that can be used to specify this. Change-Id: I241454a45dd94d3ea65a91b297f530e217f843aa
1 parent 02b5b60 commit 43f5afe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

staging/src/k8s.io/client-go/tools/cache/controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ type Config struct {
7272

7373
// Called whenever the ListAndWatch drops the connection with an error.
7474
WatchErrorHandler WatchErrorHandler
75+
76+
// WatchListPageSize is the requested chunk size of initial and relist watch lists.
77+
WatchListPageSize int64
7578
}
7679

7780
// 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{}) {
134137
c.config.FullResyncPeriod,
135138
)
136139
r.ShouldResync = c.config.ShouldResync
140+
r.WatchListPageSize = c.config.WatchListPageSize
137141
r.clock = c.clock
138142
if c.config.WatchErrorHandler != nil {
139143
r.watchErrorHandler = c.config.WatchErrorHandler

0 commit comments

Comments
 (0)