Skip to content

fix: use net.JoinHostPort for remaining Envoy admin URLs#1066

Merged
santoshpulluri merged 2 commits intomainfrom
spulluri/fixing_bugs_dp
Apr 28, 2026
Merged

fix: use net.JoinHostPort for remaining Envoy admin URLs#1066
santoshpulluri merged 2 commits intomainfrom
spulluri/fixing_bugs_dp

Conversation

@santoshpulluri
Copy link
Copy Markdown
Contributor

Description

Follow-up to #1064.

This updates the remaining Envoy admin URLs in pkg/envoy/proxy.go to use net.JoinHostPort instead of manually formatting host:port pairs.

The previous fmt.Sprintf("http://%s:%v/...") pattern is not safe for all admin bind addresses, especially IPv6 addresses. Drain() and Quit() were already updated to use net.JoinHostPort; this change applies the same fix to:

  • DumpConfig() via /config_dump?include_eds
  • Ready() via /ready

This keeps Envoy admin endpoint construction consistent across the proxy manager and avoids malformed URLs when the admin address is not a simple IPv4/hostname value.

Testing

  • Ran pkg/envoy/proxy_test.go

@santoshpulluri santoshpulluri requested review from a team as code owners April 28, 2026 07:27
Copy link
Copy Markdown
Contributor

@panman90 panman90 left a comment

Choose a reason for hiding this comment

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

LGTM

@santoshpulluri santoshpulluri added backport/1.8 Changes are backported to 1.8 backport/1.9 Changes are backported to 1.9 backport/2.0 Changes are backported to 2.0 labels Apr 28, 2026
Copy link
Copy Markdown

@shashankNandigama shashankNandigama left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.8 Changes are backported to 1.8 backport/1.9 Changes are backported to 1.9 backport/2.0 Changes are backported to 2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants