Skip to content

[v0.15] Refine conditions for reconciles from cluster updates across shards#4817

Merged
thardeck merged 1 commit into
rancher:release/v0.15from
weyfonk:4567-0.14-fix-sharded-triggers
Mar 24, 2026
Merged

[v0.15] Refine conditions for reconciles from cluster updates across shards#4817
thardeck merged 1 commit into
rancher:release/v0.15from
weyfonk:4567-0.14-fix-sharded-triggers

Conversation

@weyfonk
Copy link
Copy Markdown
Contributor

@weyfonk weyfonk commented Mar 13, 2026

Backport of #4730 to v0.15.

Refers to #4484.

Additional Information

Checklist

- [ ] I have updated the documentation via a pull request in the
fleet-docs repository.

@weyfonk weyfonk requested a review from a team as a code owner March 13, 2026 14:17
@thardeck
Copy link
Copy Markdown
Collaborator

Do not merge until after the unrc.

* Enable cluster-to-bundle updates across shards

Filtering all incoming events in the bundle reconciler would prevent
updates to relevant clusters, which may live in shards different to the
bundle's, from impacting the bundle.

Instead, all bundle controllers, regardless of their shards, may now
receive updates from clusters which are relevant to the bundle,
considering, as was already the case, the bundle and the cluster's
respective namespaces, cluster groups, and bundle namespace mappings.

* Keep shard filter on bundle reconciles from deployments

A bundle deployment is created by Fleet, and bears the same shard ID as
its originating bundle, as the sharding label is propagated along with
all Fleet labels from a bundle to its bundle deployments.
Therefore, filtering incoming bundle deployment-related events for
bundle reconciles by shard ID is safe, and preserves the performance
gain brought by the previous wider-reaching event filter.

* Enable cluster updates to trigger schedule reconciles earlier

When a cluster is created, or enabled to newly match a schedule's
targets, the schedule would not be reconciled as a result, because logic
mapping clusters to schedules only considered schedules for which jobs
had already been scheduled.

That logic now takes all schedules into account within the cluster's
namespace.

* Enable schedule reconciles from clusters in different shards

A cluster being updated would not make much of a difference, because
mapping schedules to and from clusters works based on the schedules and
clusters' respective namespaces.

However, creating a new cluster in the same namespace still needs to be
taken into account across shards, as a cluster living in a different
shard may be relevant to a schedule, living in its same namespace and
matching its targets.

* Prevent multiple reconciles per schedule per cluster event

While the Schedule reconciler must be able to process cluster events
coming from any shard, only Schedules matching the reconciler's shard
must be reconciled as a result, to prevent a given Schedule from being
reconciled concurrently across multiple controllers.
@kkaempf kkaempf added this to Fleet Mar 24, 2026
@kkaempf kkaempf added this to the v2.14.1 milestone Mar 24, 2026
@kkaempf kkaempf moved this to 👀 In review in Fleet Mar 24, 2026
@kkaempf kkaempf removed this from Fleet Mar 24, 2026
@weyfonk weyfonk force-pushed the 4567-0.14-fix-sharded-triggers branch from 3c81112 to 84f786a Compare March 24, 2026 10:27
@thardeck thardeck merged commit 109f601 into rancher:release/v0.15 Mar 24, 2026
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants