fix joining over lb (#2478)

This commit is contained in:
3u13r 2023-10-19 16:28:07 +02:00 committed by GitHub
parent 43ee0791c6
commit 6c0a3b8efa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,11 +191,11 @@ func (c *JoinClient) tryJoinWithAvailableServices() error {
var endpoints []string
ip, _, err := c.metadataAPI.GetLoadBalancerEndpoint(ctx)
endpoint, _, err := c.metadataAPI.GetLoadBalancerEndpoint(ctx)
if err != nil {
return fmt.Errorf("failed to get load balancer endpoint: %w", err)
}
endpoints = append(endpoints, net.JoinHostPort(ip, strconv.Itoa(constants.JoinServiceNodePort)))
endpoints = append(endpoints, endpoint)
ips, err := c.getControlPlaneIPs(ctx)
if err != nil {