Skip to content

feat(): route entire slice subnet via hub for spoke-to-spoke (#304) - #424

Open
Shreesha001 wants to merge 13 commits into
kubeslice:masterfrom
Shreesha001:feature/304-e2e-test
Open

feat(): route entire slice subnet via hub for spoke-to-spoke (#304)#424
Shreesha001 wants to merge 13 commits into
kubeslice:masterfrom
Shreesha001:feature/304-e2e-test

Conversation

@Shreesha001

Copy link
Copy Markdown

Description

Enables spoke-to-spoke traffic in HubAndSpoke topology on the controller side:

  • Marks each spoke's gateway with RouteEntireSliceSubnet=true so the spoke sends the whole slice to the hub, which relays it to other spokes.
  • Keeps the flag correct on topology changes: sets it on spokes, clears it on hubs (a hub must never route the whole slice).
  • Adds gateway connection-status fields to the WorkerSliceGateway CRD (for #471).
  • Adds an end-to-end test proving HubAndSpoke builds a partial mesh (no spoke-to-spoke gateway).

Fixes #304

How Has This Been Tested?

  • HubAndSpoke creates 4 gateways: hub=Server, spoke=Client with the flag; no spoke-to-spoke gateway.
  • Switching FullMesh <-> HubAndSpoke and changing the hub keeps the flag correct (no stale flags).
  • Adding/removing a spoke works.
  • Same result with Wireguard.
  • FullMesh slices are unchanged.
  • Real cluster: spoke-to-spoke iperf ~4.4 Mbit/s; gateway failover recovers.
  • go build clean; unit tests pass.

Checklist:

  • The title states what changed and the related issue number.
  • I have performed a self-review of my own code.
  • I have commented my code in hard-to-understand areas.
  • I have added the required unit test cases.

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

No. The new fields are additive. The feature works when paired with worker-operator #496 and #495.


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>
Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
…e#304)

Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
…logy changes

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.

E2E: Hub-and-Spoke topology across 3 clusters (Partial Mesh MVP)

1 participant