fix: multi-cluster lifecycle pod placement - #10450
Merged
Merged
Conversation
Collaborator
|
Auto Cherry-pick Instructions CLA Recheck Instructions |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10450 +/- ##
==========================================
+ Coverage 62.08% 62.79% +0.70%
==========================================
Files 533 533
Lines 63709 64232 +523
==========================================
+ Hits 39554 40334 +780
+ Misses 20553 20327 -226
+ Partials 3602 3571 -31
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
leon-ape
marked this pull request as ready for review
June 24, 2026 03:43
Collaborator
Author
|
/approve |
apecloud-bot
approved these changes
Jun 24, 2026
Collaborator
Author
|
/approve |
apecloud-bot
approved these changes
Jun 29, 2026
Collaborator
Author
|
/approve |
apecloud-bot
approved these changes
Jun 29, 2026
9 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
component.ListOwnedInstancesto centralize Component instance Pod listingInstanceSetReconciler2and existing object-tree/graph data-context handlingRoot cause
Component lifecycle actions need concrete Pods, but Component reconcile intentionally does not carry global multi-cluster placement. In multi-cluster deployments, direct Pod listing with
InDataContext()could therefore resolve no data clusters and return no Pods, blocking account provision before the InstanceSet update was built.Fix
The fix keeps multi-cluster awareness local to Component instance discovery.
ListOwnedInstancesderives placement from the Component first, then falls back to related workload objects such as running/proto InstanceSets, and uses that scoped context only for listing the instance Pods needed by lifecycle and ops paths.Validation
go test ./pkg/controller/componentgo test ./controllers/apps/componentgo test ./pkg/controller/component ./controllers/apps/component ./pkg/controller/instanceset ./pkg/controller/instanceset2 ./pkg/controller/instanceFixes #10440