You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Claim reconcile lists every IPAddress, and every unbound claim is requeued on any address or class event #8
Two paths in internal/controller/ipaddressclaim_controller.go scale with the size of the ledger rather than with the claim being reconciled:
bindAvailableAddress lists every IPAddress in the cluster on each reconcile of an unbound claim (r.List(ctx, list) with no field selector, around line 327). A field index exists only for claimRef (indexes.go).
unboundClaims lists every IPAddressClaim and enqueues all unbound ones on any IPAddress or IPAddressClass event (claimsForAddress, claimsForClass, lines 437–460). One address becoming Available therefore reconciles every pending claim of every class, and each of those lists the ledger again.
When it matters
Fine at hundreds of objects. At around 10k addresses and a few hundred pending claims, one release event produces a few hundred full ledger lists from the informer cache in quick succession.
Suggested fix
Index IPAddress by class and phase (and family), and have bindAvailableAddress query Available addresses of the claim's class only.
In claimsForAddress, enqueue only unbound claims whose resolved class matches the address's class (a second index on status.className). In claimsForClass, enqueue only claims of that class and claims with an empty className.
Activity