Skip to content

End-to-end coverage for federated workload delivery#146

Closed
scotwells wants to merge 11 commits into
feat/federated-deployment-schedulingfrom
split/federation-e2e
Closed

End-to-end coverage for federated workload delivery#146
scotwells wants to merge 11 commits into
feat/federated-deployment-schedulingfrom
split/federation-e2e

Conversation

@scotwells
Copy link
Copy Markdown
Contributor

Value

End-to-end confidence that the federation path actually works: a Workload targeting a city is federated to the right POP cell, its WorkloadDeployment and PropagationPolicy are projected downstream, Instance status is written back, and teardown cascades correctly. These suites exercise that behavior against a real multi-cluster environment.

Why it's a separate PR

These chainsaw suites were carved out of the federation foundation PR (#107) so the controller change reviews without ~900 lines of test YAML inline. The shared harness (test/e2e/env, e2e_test.go, chainsaw-config.yaml) stays in #107 as foundational infrastructure — this PR adds only the federation-specific suites on top of it.

What

Federation e2e suites: full-federation, instance-projection, instance-writeback, propagation-policy-lifecycle, workload-deployment-federation, and deletion-cascade.

Stack

Stacks directly on #107 (sibling to the foundation-completion PR #142). go build / vet on the base are unaffected — this is additive test YAML only.

🤖 Generated with Claude Code

@scotwells scotwells force-pushed the feat/federated-deployment-scheduling branch from bf73355 to a5755e4 Compare June 5, 2026 15:13
@scotwells scotwells force-pushed the split/federation-e2e branch from 39f4698 to 8cd0b1d Compare June 5, 2026 15:13
@scotwells scotwells force-pushed the feat/federated-deployment-scheduling branch from a5755e4 to cfc79cb Compare June 5, 2026 15:25
@scotwells scotwells force-pushed the split/federation-e2e branch from 8cd0b1d to e4c308f Compare June 5, 2026 15:25
scotwells and others added 11 commits June 5, 2026 11:19
Bump the toolchain to Go 1.25 and golangci-lint v2.12.2, introduce a
Taskfile for the standard build/test/lint targets, and align the CI
workflows and Makefile with the new versions. Remove stale RFC and
enhancement docs that the federated-scheduling work supersedes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Delete the central scheduler that placed WorkloadDeployments from a
single control plane. Placement now happens through the distributed
federator and per-cell controllers introduced in the following commits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Introduce the federator that fans a WorkloadDeployment out to the cells
selected for its placement, replacing the central scheduler. Add the
city-code field indexer it uses to map subnet/location events back to the
deployments that depend on them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the projector that mirrors cell-side Instances back to the
management plane, writing their status (readiness, placement, blocking
reasons) onto the project-scoped Instance so callers see a single view
across cells. Include the shared controller test helpers that build the
project/Karmada fake clients and multi-cluster manager used by the
federation tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…liation

Rework the WorkloadDeployment and Workload controllers to run per cell,
resolving networks and Locations locally and driving Instance lifecycle
through the stateful instance-control logic rather than a central
scheduler. Update the instance-control packages to manage Instances
within a cell's control plane.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update the Instance controller to compute the Ready condition and apply
the per-project quota gate within a single reconcile pass, surfacing
blocking reasons when quota is unavailable so federated placement
reflects real allocatable capacity.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wire the manager to run in either cell or management-plane mode, gating
the federator, projector, and per-cell controllers behind feature flags.
Add the feature-gate registry and extend configuration to carry the
downstream kubeconfig and discovery settings each mode needs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update Workload webhook and Instance validation so the API accepts the
fields federated scheduling adds and continues to reject invalid
placement and runtime specs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regenerate the Instance, Workload, and WorkloadDeployment CRDs for the
new API fields and add the kustomize structure that deploys the manager
in cell or management-plane mode: federation and downstream RBAC bases,
cell/management/quota-credentials components, the WorkloadDeployment
status interpreter, and the matching overlays.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the shared e2e environment helper plus the kind and Chainsaw
configuration and kubeconfig/cluster-secret scripts that stand up a
multi-cluster control plane, so federated scheduling can be exercised
end to end.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…riteback, PP lifecycle, deletion-cascade)

Carved out of the federation foundation PR so the controller change reviews
without ~900 lines of chainsaw YAML inline. These suites exercise the
federation behaviour end-to-end against the shared test/e2e/env harness
(which stays with the foundation).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scotwells
Copy link
Copy Markdown
Contributor Author

Deferring the local-run e2e suites until we have an in-cluster harness that deploys operators to the cells — tracked in #149. The federation suites are preserved on this branch (split/federation-e2e) and the archive branch archive/e2e-local-deferred.

@scotwells scotwells closed this Jun 5, 2026
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.

1 participant