Skip to content

feat: allow forward-node-ip per gateway via annotation - #200

Merged
njucjc merged 1 commit into
openyurtio:mainfrom
u7k4rs6:feat/gateway-forward-node-ip
Oct 9, 2026
Merged

njucjc merged 1 commit into
openyurtio:mainfrom
u7k4rs6:feat/gateway-forward-node-ip

Conversation

@u7k4rs6

@u7k4rs6 u7k4rs6 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

This covers the 2026 H2 roadmap item "Support NodePool-level configuration of Raven forward-node-ip".

forward-node-ip is currently a single agent flag for the whole cluster. The tunnel engine already decides it per gateway in syncGateway, so this adds a raven.openyurt.io/forward-node-ip annotation on the Gateway that overrides the global flag ("true"/"false", anything else falls back to the flag). Since every agent reads the same annotation for each gateway, both sides of a tunnel agree on whether that gateway's node IPs are routed. It's the same pattern as the per-gateway enable-proxy/enable-tunnel annotations in openyurtio/openyurt#2578.

Added a table test for syncGateway covering the flag and annotation combinations. go vet, golangci-lint and go test ./pkg/engine/... ./pkg/utils/... pass locally.

@njucjc @rambohe-ch @zyjhtangtang could you take a look? If you'd prefer this as a field on the Gateway spec instead of an annotation, happy to rework it.

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 29.79%. Comparing base (6fbb6d1) to head (3c3f033).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
+ Coverage   28.36%   29.79%   +1.43%     
==========================================
  Files          35       35              
  Lines        3624     3638      +14     
==========================================
+ Hits         1028     1084      +56     
+ Misses       2431     2384      -47     
- Partials      165      170       +5     
Flag Coverage Δ
unittests 29.79% <100.00%> (+1.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njucjc
njucjc merged commit 2f3f60d into openyurtio:main Oct 9, 2026
11 checks passed
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