Skip to content

feat(config): add controller warmup flag for faster leader failover #226

Open
a-hilaly wants to merge 2 commits intoaws-controllers-k8s:mainfrom
a-hilaly:warmup-replicas
Open

feat(config): add controller warmup flag for faster leader failover #226
a-hilaly wants to merge 2 commits intoaws-controllers-k8s:mainfrom
a-hilaly:warmup-replicas

Conversation

@a-hilaly
Copy link
Member

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.

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.
@ack-prow ack-prow bot requested a review from knottnt January 20, 2026 05:41
@ack-prow
Copy link

ack-prow bot commented Jan 20, 2026

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow bot requested a review from michaelhtm January 20, 2026 05:41
@ack-prow ack-prow bot added the approved label Jan 20, 2026
@a-hilaly
Copy link
Member Author

needs #225 to be merged first.

/hold

@ack-prow ack-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 20, 2026
@ack-prow
Copy link

ack-prow bot commented Jan 20, 2026

@a-hilaly: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
verify-attribution f33099b link false /test verify-attribution
s3-controller-test f33099b link true /test s3-controller-test
ec2-controller-test f33099b link true /test ec2-controller-test

Full PR test history. Your PR dashboard.

Details

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant