5 Commits

Author SHA1 Message Date
Antonio Ojea
459188ce25 Port BoundedFrequencyRunner from flowcontrol.RateLimiter to clock.Clock
Co-authored-by: Dan Winship <danwinship@redhat.com>
2025-07-01 08:54:14 -04:00
Dan Winship
eae17c21b0 Change how BoundedFrequencyRunner retries work
Rather than having a RetryAfter function, do a retry (at a fixed
interval) if the work function returns an error.

Co-authored-by: Antonio Ojea <aojea@google.com>
2025-07-01 08:54:14 -04:00
Dan Winship
c16ee887ef Remove burst syncs from BoundedFrequencyRunner
Burst syncs are theoretically useful for dealing with a single change
that results in multiple Run() calls (eg, a Service and EndpointSlice
both changing), but 2 isn't enough to cover all cases, and a better
way of dealing with this problem is to just use a smaller
minSyncPeriod.

Co-authored-by: Antonio Ojea <aojea@google.com>
2025-07-01 08:54:14 -04:00
Dan Winship
0298e04ea0 Updates to BoundedFrequencyRunner
- Use structured logging.
- Use t.Helper() in unit tests.
- Improve some comments.
- Remove an unnecessary check/panic.

Co-authored-by: Antonio Ojea <aojea@google.com>
2025-07-01 08:54:14 -04:00
Antonio Ojea
6da9d363f3 Copy BoundedFrequencyRunner to kube-proxy 2025-07-01 08:53:54 -04:00