Skip to content

Commit

Permalink
Merge pull request #4066 from rustycl0ck/release-0.3
Browse files Browse the repository at this point in the history
🐛 Fix APIEndpoint for IPv6
  • Loading branch information
k8s-ci-robot authored Jan 13, 2021
2 parents 8a9c777 + 8b7f2e9 commit 876dc7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/v1alpha3/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package v1alpha3

import (
"fmt"
"net"
"strings"

corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -190,7 +191,7 @@ func (v APIEndpoint) IsValid() bool {

// String returns a formatted version HOST:PORT of this APIEndpoint.
func (v APIEndpoint) String() string {
return fmt.Sprintf("%s:%d", v.Host, v.Port)
return net.JoinHostPort(v.Host, fmt.Sprintf("%d", v.Port))
}

// ANCHOR_END: APIEndpoint
Expand Down

0 comments on commit 876dc7a

Please sign in to comment.