- Notifications
You must be signed in to change notification settings - Fork 1.2k
✨ Implement warm replica support for controllers #3192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
k8s-ci-robot merged 53 commits into kubernetes-sigs:main from godwinpang:warm-replica-impl Jul 25, 2025
Merged
Changes from 52 commits
Commits
Show all changes
53 commits Select commit Hold shift + click to select a range
8239300 [Warm Replicas] Implement warm replica support for controllers.
godwinpang 73fc8fa Remove irrelevant runnable_group.go code.
godwinpang be1b1c2 Rename ShouldWarmup.
godwinpang c9b99eb fmt
godwinpang e7a2bbf Change to atomic.Bool to avoid race in test.
godwinpang 854987c Address comments.
godwinpang 072ad4b Add ready check to block controller startup until warmup is complete.
godwinpang 43118a3 Keep test helper structs private.
godwinpang b67bc65 Address comments.
godwinpang fc7c8c5 Fix lint.
godwinpang 6bb4616 Address naming + comments from sbueringer.
godwinpang ccc7485 Refactor tests to use HaveValue.
godwinpang 54f4fe3 Document + add UT for WaitForWarmupComplete behavior on ctx cancellat…
godwinpang 667bb03 Add unit test that exercises controller warmup integration with manager.
godwinpang 66e3be4 Add UT that verifies WaitForWarmupComplete blocking / non-blocking be…
godwinpang d9cc96b Verify r.Others.startQueue in runnables test cases.
godwinpang 65a04d5 Fix UT to verify runnable ordering.
godwinpang c201bfa Fix UT for WaitForWarmupComplete blocking.
godwinpang 5a13db4 Document !NeedLeaderElection+NeedWarmup behavior
godwinpang 4879527 Fix test race.
godwinpang 57acc77 Cleanup test wrapper runnables.
godwinpang 1987b54 Make didStartEventSources run once with sync.Once + UT.
godwinpang a49f3a4 Rewrite Warmup to avoid polling.
godwinpang 89f5479 Rename NeedWarmup to EnableWarmup.
godwinpang 9d5ddfb Clarify comment on Warmup.
godwinpang 66f64f0 Move reset watches critical section inside of startEventSources.
godwinpang 0563114 Add test to assert startEventSources blocking behavior.
godwinpang aa20ef5 Make Start threadsafe with Warmup + UT.
godwinpang c9a2973 Change warmup to use buffered error channel and add New method.
godwinpang 79a7b95 Fail in warmup directly and rely on sync.Once for warmup thread-safet…
godwinpang c1d8ea4 Sync controller EnableWarmup comments.
godwinpang 5df573f Rename to startEventSourcesLocked and lock with c.mu
godwinpang d8650df Address edge case for watch added after warmup completes.
godwinpang a03f404 Fix test description and set leaderelection==true
godwinpang dcf4b8b Fix lint.
godwinpang ba51d28 Change shutdown order to shutdown warmup runnables in parallel with o…
godwinpang ea2aa0e Fix test races by ensuring goroutines do not outlive their It blocks.
godwinpang 730b30e Block on source start on context cancel.
godwinpang bca3e2a Guard access to c.Queue explicitly.
godwinpang 12e938c Initialize queue in warmup with test.
godwinpang de4232d Fix watch comment.
godwinpang a3dc13b Add warmup to manager and controller integration tests.
godwinpang 84d2053 fmt + lint.
godwinpang cefd22d Add tests for Warmup for parity with Start.
godwinpang 8c7b12f golangci-lint
godwinpang 1ed6722 Increase test coverage for start with warmup race.
godwinpang 6f6325c Remove synchronization code around c.Queue concurrent access.
godwinpang a49b1d7 Assert startedEventSourcesAndQueue is set in tests.
godwinpang 2d58f37 fmt
godwinpang 36ea9ff Clarify namespace predicate vs. cleanup in controller integration test.
godwinpang 842c8b5 Add option for fake leader elector package and assert that warmup run…
godwinpang 26484e8 fmt + rename
godwinpang 1d47dd1 Address PR comments.
godwinpang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.