Skip to content

fix(endpoint): stop annotating nodes with force-endpoint from InternalIP#24

Merged
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
fix/no-force-endpoint
Jun 19, 2026
Merged

fix(endpoint): stop annotating nodes with force-endpoint from InternalIP#24
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
fix/no-force-endpoint

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Jun 19, 2026

Copy link
Copy Markdown
Member

The reconciler set kilo.squat.ai/force-endpoint=<InternalIPv4> on every remote-cluster node lacking an explicit endpoint source. For NAT'd tenants (OpenStack VMs whose internal IP is not routable across clusters) this advertised an unreachable endpoint and broke cross-cluster connectivity until manually overridden.

Drop ensureNodeEndpoints/EnsureForceEndpoint and rely on the existing endpoint resolution chain: clustermesh-endpoint (populated by the discovered-endpoint enrichment) > force-endpoint (if set manually) > NodeExternalIP. The operator no longer fabricates a wrong endpoint; NAT'd nodes are reached via the discovered NAT egress.

Summary by CodeRabbit

Release Notes

  • Refactor
    • Removed automatic force-endpoint annotation patching on clustermesh nodes during reconciliation
    • Cleaned up associated helper code and test coverage

The reconciler set kilo.squat.ai/force-endpoint=<InternalIPv4> on every
remote-cluster node that lacked an explicit endpoint source. For NAT'd
tenants (OpenStack VMs without a routable internal address) this advertised
an unreachable endpoint, breaking cross-cluster connectivity until a human
manually overrode the annotation. Drop ensureNodeEndpoints/EnsureForceEndpoint
and rely on the existing resolution chain: clustermesh-endpoint (set by the
discovered-endpoint enrichment) > force-endpoint (if set manually) >
NodeExternalIP. The operator no longer fabricates a wrong endpoint.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6b9641c3-1041-4b7f-8566-d969ae73ad9d

📥 Commits

Reviewing files that changed from the base of the PR and between 7eb7a9a and f9f58a9.

📒 Files selected for processing (4)
  • internal/controller/clustermesh_controller.go
  • internal/kilonode/discovered_test.go
  • internal/kilonode/ensure_endpoint.go
  • internal/kilonode/ensure_endpoint_test.go
💤 Files with no reviewable changes (3)
  • internal/kilonode/ensure_endpoint_test.go
  • internal/kilonode/ensure_endpoint.go
  • internal/controller/clustermesh_controller.go

📝 Walkthrough

Walkthrough

The PR removes the EnsureForceEndpoint function from internal/kilonode/ensure_endpoint.go (and its entire file), removes the ensureNodeEndpoints call and method from the clustermesh controller, deletes the associated test file, and adds an ensureScheme helper to internal/kilonode/discovered_test.go.

Changes

Remove force-endpoint annotation patching

Layer / File(s) Summary
Remove ensureNodeEndpoints call and method from controller
internal/controller/clustermesh_controller.go
reconcileAllClusters no longer invokes ensureNodeEndpoints after listing source cluster nodes, and the ensureNodeEndpoints method is deleted entirely; the controller now proceeds directly from node listing to filtering.
Delete EnsureForceEndpoint helper and its tests; add ensureScheme to discovered tests
internal/kilonode/ensure_endpoint.go, internal/kilonode/ensure_endpoint_test.go, internal/kilonode/discovered_test.go
ensure_endpoint.go and its test file are removed, eliminating the exported EnsureForceEndpoint function that patched kilo.squat.ai/force-endpoint annotations. discovered_test.go gains a runtime import and an ensureScheme helper to register core/v1 types for the fake client.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • Arsolitt

Poem

🐇 Hop, hop, the endpoint's gone,
No more patching carried on!
The annotation's wiped away,
Force-endpoint had its day.
Clean controller, lighter code —
One less burden on the road! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing automatic force-endpoint annotation from nodes derived from InternalIP.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/no-force-endpoint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request removes the ensureNodeEndpoints functionality, including the EnsureForceEndpoint implementation and its associated tests. It also adds an ensureScheme helper function to internal/kilonode/discovered_test.go. I have no feedback to provide on these changes.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@kvaps
Andrei Kvapil (kvaps) merged commit 95c698e into main Jun 19, 2026
7 of 8 checks passed
@kvaps
Andrei Kvapil (kvaps) deleted the fix/no-force-endpoint branch June 19, 2026 19:21
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.

1 participant