mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-05 09:06:58 +02:00
Make routegroup client IPv6 compatible
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
This commit is contained in:
parent
a60480f414
commit
b48bb26c5f
@ -210,7 +210,8 @@ func NewRouteGroupSource(timeout time.Duration, token, tokenPath, apiServerURL,
|
||||
apiServer := u.String()
|
||||
// strip port if well known port, because of TLS certificate match
|
||||
if u.Scheme == "https" && u.Port() == "443" {
|
||||
apiServer = "https://" + u.Hostname()
|
||||
// correctly handle IPv6 addresses by keeping surrounding `[]`.
|
||||
apiServer = "https://" + strings.TrimSuffix(u.Host, ":443")
|
||||
}
|
||||
|
||||
sc := &routeGroupSource{
|
||||
|
Loading…
Reference in New Issue
Block a user