kubeslice / kubeslice/kubeslice-controller
Design/ADR: Partial Mesh MVP = Hub-and-Spoke topology
- Dominant language
- Go
- Stars
- 73
- Forks
- 48
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 8
Description
## Summary
Write the ADR for Partial Mesh MVP using the Hub-and-Spoke topology. This is the prerequisite gate for worker-operator #470 and #471. No implementation PR will be reviewed until this ADR is merged.
A starter template is available at:
`docs/superpowers/specs/2026-06-24-hub-and-spoke-partial-mesh-adr.md`
---
## Problem
KubeSlice today creates a full mesh of peer connections between all clusters in a Slice — every cluster connects to every other. Link count grows as O(n²). For a 10-cluster slice that is 45 tunnel links. Hub-and-Spoke reduces this to O(n): only hub↔spoke links are established, no spoke↔spoke.
---
## MVP scope: Hub-and-Spoke only
The ADR covers **one topology mode only**: `HubAndSpoke`. The `Linear` topology proposed earlier is **out of scope for this MVP** and must not be implemented in this mentorship term.
---
## Decisions the ADR must make
| # | Decision | Key question |
|---|---|---|
| 1 | CRD schema | What fields are added to `SliceConfig`? Are they optional? What is the zero-value behavior? |
| 2 | Topology resolver placement | Does the resolver sit before the peer-intent builder (separate component) or inside the reconciler as a flag? |
| 3 | Edge computation algorithm | Given hubs `H` and spokes `S`, exactly which edges are created? What about hub↔hub when 2 hubs are defined? |
| 4 | Hub change / rewire safety | When `hubs` changes, in what order are new links added and old links removed to avoid isolating spokes? |
| 5 | Backward compatibility | What does a SliceConfig with no `topology` field do? How are existing slices affected by the upgrade? |
| 6 | desiredPeers delivery | Which CR carries the desired peer list to workers — existing `WorkerSliceConfig` field or new field? |
| 7 | Status aggregation | How does the controller roll up per-peer worker status into a Slice-level condition? |
---
## Required ADR deliverables
- [ ] YAML example of a valid `HubAndSpoke` SliceConfig
- [ ] YAML example of a topology update (hub change)
- [ ] Edge computation table with examples for 1-hub and 2-hub cases
- [ ] Backward compatibility statement: existing SliceConfigs with no topology field → full mesh, unaffected
- [ ] Validation webhook rules (what it rejects and why)
- [ ] Sequence diagram: normal convergence (controller computes edges → writes worker intents → workers connect → status rolls up)
- [ ] Sequence diagram: hub change (safe rewire order)
- [ ] Non-goals list: spoke-to-spoke relay, auto hub selection, other topology modes
---
## Delivery Timeline (June 24 – August 31)
| Week | Dates | Deliverable |
|---|---|---|
| 1 | Jun 24 – Jun 30 |https://github.com/kubeslice/kubeslice-controller/issues/301 |
| 2 | Jul 1 – Jul 7 | https://github.com/kubeslice/kubeslice-controller/issues/301 and https://github.com/kubeslice/kubeslice-controller/issues/302 |
| 3 | Jul 8 – Jul 14 | https://github.com/kubeslice/kubeslice-controller/issues/301 and https://github.com/kubeslice/kubeslice-controller/issues/302 |
| 4 | Jul 15 – Jul 21 | https://github.com/kubeslice/kubeslice-controller/issues/301 and https://github.com/kubeslice/kubeslice-controller/issues/302 |
| **Midterm** | **~Jul 21** | **Demo: |
| 5 | Jul 22 – Jul 28 | https://github.com/kubeslice/kubeslice-controller/issues/303 |
| 6 | Jul 29 – Aug 4 | https://github.com/kubeslice/kubeslice-controller/issues/304 (awaiting review for writing test cases) and https://github.com/kubeslice/kubeslice-controller/issues/412 (PR submitted - 4th Aug) |
| 7 | Aug 5 – Aug 11 | |
| 8 | Aug 12 – Aug 18 | |
| 9–10 | Aug 19 – Aug 31 | |
**Midterm demo criteria (July 21):**
---
## Acceptance Criteria
- [ ] ADR merged and approved by all three mentors
- [ ] Every open question in the template answered or explicitly deferred
- [ ] Implementation issues #470 and #471 updated to reference specific ADR decisions
- [ ] A reader unfamiliar with KubeSlice can follow the edge computation table and reproduce the link set for any given input
Contributor guide
Assessment
This issue has not been assessed yet.