Skip to content

Add NetworkService and resolve its membership from interfaces - #441

Merged
scotwells merged 1 commit into
mainfrom
feat/networkservice-api
Sep 9, 2026
Merged

Add NetworkService and resolve its membership from interfaces#441
scotwells merged 1 commit into
mainfrom
feat/networkservice-api

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

An application running in several locations has no resource that names its members as a group, so a consumer who wants traffic spread across them writes addresses, per-location weights, and a failover order by hand and keeps them current as capacity moves. This adds a network service that selects network interfaces by label and reports per-location member and health counts in its status, with membership tracking whatever is bound at the time. A controller resolves the selector into membership, counts a member healthy only when its holder says it is available, and refuses a selector whose members span two networks since a service is one network. This is the third of six stacked pull requests splitting the network services prototype, and it builds on the holder condition from the first.

Test plan

  • Unit tests cover membership resolution, health rollup by location, and the multiple-network refusal
  • Unit tests cover re-enqueueing a service when a matching interface changes
  • Generated CRD, deepcopy, RBAC, and reference docs are regenerated from source and match the prototype
  • Full test suite and lint pass in CI

An application that runs in several locations has no resource that
names its members as a group, so a consumer who wants traffic spread
across them has to write addresses, per-location weights and a failover
order by hand and keep them current as capacity moves.

Add NetworkService, which selects network interfaces by label and
reports per-location member and health counts in its status. A
controller resolves the selector into membership, counts a member
healthy only when its holder says so, and refuses a selector whose
members span two networks. Protect the new kind with Milo IAM.

Key changes:
- Add the NetworkService API type, CRD and reference docs
- Add a controller resolving membership from bound interfaces
- Report Ready and MembersResolved with per-location summaries
- Register the kind as an IAM protected resource and grant roles
ecv
ecv previously approved these changes Sep 9, 2026

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The NetworkService API and membership resolution read cleanly. Namespace scoping, the empty-selector CEL guard, the multi-network refusal, and the healthy-vs-member split are all covered by unit tests, and status is recomputed whole each pass with a stability test behind it.

Minor note for later, not a blocker: the serving field comment reads as though there is a health threshold, while the implementation is strictly healthy > 0.

@scotwells
scotwells deleted the branch main September 9, 2026 22:32
Base automatically changed from feat/federation-hub-plumbing to main September 9, 2026 22:32
@scotwells
scotwells dismissed ecv’s stale review September 9, 2026 22:32

The base branch was changed.

@scotwells scotwells closed this Sep 9, 2026
@scotwells scotwells reopened this Sep 9, 2026
@scotwells
scotwells merged commit b5b67dd into main Sep 9, 2026
16 of 17 checks passed
@scotwells
scotwells deleted the feat/networkservice-api branch September 9, 2026 22:33
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.

2 participants