Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changelog/1066.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```release-note:bug
- envoy: use safe host:port construction for remaining admin API URLs to avoid malformed admin endpoint URLs with IPv6 addresses
10 changes: 8 additions & 2 deletions pkg/envoy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ func (p *Proxy) DumpConfig() error {
}

func (p *Proxy) dumpConfig() error {
envoyConfigDumpUrl := fmt.Sprintf("http://%s:%v/config_dump?include_eds", p.cfg.AdminAddr, p.cfg.AdminBindPort)
envoyConfigDumpUrl := fmt.Sprintf(
"http://%s/config_dump?include_eds",
net.JoinHostPort(p.cfg.AdminAddr, strconv.Itoa(p.cfg.AdminBindPort)),
)

rsp, err := p.client.Get(envoyConfigDumpUrl)
if err != nil {
Expand Down Expand Up @@ -398,7 +401,10 @@ func (p *Proxy) Ready() (bool, error) {
return false, nil
case stateRunning, stateInitial:
// Query ready endpoint to check if proxy is Ready
envoyReadyURL := fmt.Sprintf("http://%s:%v/ready", p.cfg.AdminAddr, p.cfg.AdminBindPort)
envoyReadyURL := fmt.Sprintf(
"http://%s/ready",
net.JoinHostPort(p.cfg.AdminAddr, strconv.Itoa(p.cfg.AdminBindPort)),
)
rsp, err := p.client.Get(envoyReadyURL)
if err != nil {
p.cfg.Logger.Error("envoy: admin endpoint not available", "error", err)
Expand Down
Loading