Repository navigation
net: reconcile SiteNodeSlices per Site - #915
Draft
Patrick W. Healy (phealy) wants to merge 3 commits into
Draft
Patrick W. Healy (phealy) wants to merge 3 commits into
Patrick W. Healy (phealy) wants to merge 3 commits into
Conversation
Patrick W. Healy (phealy)
added this pull request to stack #919
October 14, 2026 23:10
This was referenced Oct 14, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Event targeting can miss affected Sites, leaving stale Node membership or missing connectivity slices.
3 open findings
What changed in this PR
Reduces controller API load by reconciling SiteNodeSlices only for affected Sites.
Changes:
- Adds per-Site dirty tracking and cache-based no-op checks.
- Moves orphan repair to a separate periodic loop.
- Adds reconciliation tests and design documentation.
| File | Description |
|---|---|
| internal/net/controller/site_controller.go | Targets reconciliation and defers orphan repair. |
| internal/net/controller/site_controller_helpers_test.go | Tests targeted work, no-op reads, and malformed-slice repair. |
| designs/site-node-slices.md | Documents reconciliation scope and live-state safeguards. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ab9b78ee-42b8-4841-8d74-cd78d002d48b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ab9b78ee-42b8-4841-8d74-cd78d002d48b
SiteNodeSlice membership is derived from internal IPs, so Node updates and deletions dirty both the labeled and IP-matched Sites. Slice updates dirty both the old and new siteName so the original Site can repair a slice that the new Site deletes as extra. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ab9b78ee-42b8-4841-8d74-cd78d002d48b
Patrick W. Healy (phealy)
force-pushed
the
phealy/net-api-site-slices
branch
from
October 16, 2026 13:37
bfe4d9c to
7bfcdac
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Reconcile SiteNodeSlices one Site at a time instead of reconsidering every Site on any change.
designs/site-node-slices.mddocuments the approach.Testing
Unit tests cover:
Stack
This is one of five stacked PRs that reduce API server load from unbounded-net-controller and unbounded-net-node. Kubernetes remains the source of truth. Review them bottom to top:
Motivation. A large cluster running v0.8.0 had the controller continuously writing objects that hadn't changed. Every node agent also watched the whole cluster's gateway topology. On a canary cluster, the full stack cut controller API calls by 54.4% and node agent API calls by 73.8%.