bundle controller shard filtering based on cluster changes#4567
bundle controller shard filtering based on cluster changes#4567johnjcool wants to merge 2 commits into
Conversation
… changes Ensure cluster-triggered bundle reconciles respect shard filtering in `internal/cmd/controller/reconciler/bundle_controller.go`. Fixes rancher#4484 Signed-off-by: johnjcool <john.j.cool@googlemail.com>
There was a problem hiding this comment.
Pull request overview
This PR adds shard filtering to prevent cross-shard reconciliations in the bundle controller. When cluster objects change, the controller now only enqueues bundles that belong to the current shard, improving efficiency in multi-shard deployments.
Changes:
- Added shard filtering predicates to all watch handlers (Bundle, BundleDeployment, Cluster, Secret, ConfigMap)
- Removed global
WithEventFilterin favor of per-watch filtering - Ensured fan-out operations respect shard boundaries
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: johnjcool <john.j.cool@googlemail.com>
|
Thanks @johnjcool for your contribution :) |
We've had a closer look, leading to the following conclusions:
|
|
Superseded by #4730. |
Refers to #4484
This PR updates shard filtering behavior for cluster->bundle fan-out in internal/cmd/controller/reconciler/bundle_controller.go. When a fleet.Cluster changes (labels/annotations/spec/status), the controller now only enqueues reconcile requests for fleet.Bundle objects that should be processed by the current shard (ShardID), preventing cross-shard reconciles triggered by cluster updates.