feat(config): add controller warmup flag for faster leader failover #226
feat(config): add controller warmup flag for faster leader failover #226a-hilaly wants to merge 2 commits intoaws-controllers-k8s:mainfrom
Conversation
This updates `controller-runtime` from v0.20.4 to v0.23.0, which also pulls in k8s.io/* dependencies from v0.32.1 to v0.35.0 and requires Go 1.25. The mockery installation script now builds from source using `go install` instead of downloading pre-built binaries. Pre-built binaries were compiled with Go 1.24 and couldn't parse Go 1.25 code in the new controller-runtime, causing mock generation to fail.
This adds the `--enable-controller-warmup` flag to allow controllers to start their sources (watches and informers) before leader election is won. Pre populating caches during the election wait period reduces the time needed to start reconciling after becoming the leader. The flag requires `--enable-leader-election` to be set, since warmup only makes sense in leader election scenarios where there's a period between startup and acquiring the lock.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
needs #225 to be merged first. /hold |
|
@a-hilaly: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This adds the
--enable-controller-warmupflag to allow controllers tostart their sources (watches and informers) before leader election is
won. Pre populating caches during the election wait period reduces the
time needed to start reconciling after becoming the leader.
The flag requires
--enable-leader-electionto be set, since warmuponly makes sense in leader election scenarios where there's a period
between startup and acquiring the lock.