@@ -510,7 +510,7 @@ func (r *Reflector) list(stopCh <-chan struct{}) error {
510
510
pager .PageSize = 0
511
511
}
512
512
513
- list , paginatedResult , err = pager .List (context .Background (), options )
513
+ list , paginatedResult , err = pager .ListWithAlloc (context .Background (), options )
514
514
if isExpiredError (err ) || isTooLargeResourceVersionError (err ) {
515
515
r .setIsLastSyncResourceVersionUnavailable (true )
516
516
// Retry immediately if the resource version used to list is unavailable.
@@ -519,7 +519,7 @@ func (r *Reflector) list(stopCh <-chan struct{}) error {
519
519
// resource version it is listing at is expired or the cache may not yet be synced to the provided
520
520
// resource version. So we need to fallback to resourceVersion="" in all to recover and ensure
521
521
// the reflector makes forward progress.
522
- list , paginatedResult , err = pager .List (context .Background (), metav1.ListOptions {ResourceVersion : r .relistResourceVersion ()})
522
+ list , paginatedResult , err = pager .ListWithAlloc (context .Background (), metav1.ListOptions {ResourceVersion : r .relistResourceVersion ()})
523
523
}
524
524
close (listCh )
525
525
}()
@@ -557,7 +557,7 @@ func (r *Reflector) list(stopCh <-chan struct{}) error {
557
557
}
558
558
resourceVersion = listMetaInterface .GetResourceVersion ()
559
559
initTrace .Step ("Resource version extracted" )
560
- items , err := meta .ExtractList (list )
560
+ items , err := meta .ExtractListWithAlloc (list )
561
561
if err != nil {
562
562
return fmt .Errorf ("unable to understand list result %#v (%v)" , list , err )
563
563
}
0 commit comments