k8snetworkplumbingwg / whereabouts

A CNI IPAM plugin that assigns IP addresses cluster-wide
Apache License 2.0
273 stars 120 forks source link

🌱 Adding pagination to ListOverlappingIPs to fix context deadline error. #438

Closed adilGhaffarDev closed 1 month ago

adilGhaffarDev commented 3 months ago

What this PR does / why we need it: ListOverlappingIPs function fails with error : failed to list all OverLappingIPs: client rate limiter Wait returned an error: context deadline exceeded if there are a large number of IPs. This pr adds pagination to ListOptions so instead of trying to get all ips at once, we get them in chunks of 50.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #389

Special notes for your reviewer (optional): We can fix this issue another way by increasing timeout. But pagination seems like a better approach.