Skip to content

Feature/302 edge computation - #410

Open
Shreesha001 wants to merge 7 commits into
kubeslice:masterfrom
Shreesha001:feature/302-edge-computation
Open

Feature/302 edge computation#410
Shreesha001 wants to merge 7 commits into
kubeslice:masterfrom
Shreesha001:feature/302-edge-computation

Conversation

@Shreesha001

Copy link
Copy Markdown

Description

Controller-side edge computation for Hub-and-Spoke topology (stacked on #301).

  • ResolveTopologyEdges computes desired edges: hub↔spoke with the hub as Server; nil/FullMesh → all pairs (unchanged).
  • Gateway creation is gated on these edges (only hub↔spoke pairs are created).
  • Cleanup is edge-aware: gateways whose edge is no longer desired are removed — so editing a full-mesh slice to hub-and-spoke in place drops the stale spoke↔spoke link.

Not in scope: changing the hub of an existing slice (the shared link keeps its old server side) — deferred with rewiring (ADR Open issues).

Fixes #302

How Has This Been Tested?

  • Unit: table-driven resolver tests, edge-set membership test, create-skips-spoke↔spoke test, and cleanup-removes-stale-spoke↔spoke test.
  • Local Kind: fresh hub-and-spoke → 4 gateways (hub=Server, no spoke↔spoke); full-mesh → 6 unchanged; in-place patch full-mesh→hub-and-spoke → spoke↔spoke removed live.

Does this PR introduce a breaking change for other components like worker-operator?

No.

Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
- pin Hubs to MaxItems=1 (schema now matches the single-hub webhook rule)
- order the single-hub check before the duplicate check; mark both as
  defense-in-depth behind the schema limit
- comment the unreachable spokes==0 guard
- clarify the sample is API/validation-only (topology not yet consumed)
- add trailing newline to sample; regen CRD with controller-gen v0.19.0

Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
…gy test cases

Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
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.

Controller: Compute hub-and-spoke edges and publish worker intents (Partial Mesh MVP)

2 participants