fix(network): format IPv6 upstream addresses - #901
Conversation
Use bracketed host-port formatting for proxy peer requests and Envoy original destinations so IPv6 routes remain valid. Signed-off-by: chengshirui <chengshirui_yewu@cmss.chinamobile.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @cyrilcsr! It looks like this is your first PR to openkruise/agents 🎉 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #901 +/- ##
==========================================
- Coverage 82.40% 82.39% -0.01%
==========================================
Files 254 254
Lines 21457 21459 +2
==========================================
Hits 17682 17682
- Misses 3077 3078 +1
- Partials 698 699 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Thanks for the detailed sweep. Agreed—both paths use the same Pod IP and should be covered by this PR. I’ll update them and add IPv6 tests. |
Signed-off-by: chengshirui <chengshirui_yewu@cmss.chinamobile.com>
Ⅰ. Describe what this PR does
This PR fixes ambiguous IPv6 host-port formatting in the sandbox traffic data
plane.
It uses
net.JoinHostPortin the following address-construction paths:pkg/proxy/ext_proc.go: Envoyx-envoy-original-dst-hostvalues.pkg/proxy/utils.go: sandbox-manager peer refresh HTTP URLs.pkg/sandbox-gateway/filter/filter.go: Envoyenvoy.lb.original_dstmetadata.
pkg/utils/runtime/runtime.go: agent-runtime fallback URLs derived from theSandbox Pod IP.
pkg/utils/proxyutils/default.go: direct HTTP requests to a Sandbox Pod IP.For example, an IPv6 destination is now formatted as
[2001:db8::1]:49999instead of
2001:db8::1:49999.IPv4 behavior remains unchanged. This PR does not change route synchronization,
retry, concurrency, TLS authority, or memberlist behavior.
Ⅱ. Does this pull request fix one issue?
NONE
Ⅲ. Describe how to verify it
The full unit-test suite passes with Go 1.25.9: