Change cloud provider CreateTCPLoadBalancer to return endpoint as string
Some load balancers (particularly AWS ELB) define the public endpoint as a hostname (instead of using IP addresses). This is a partial fix for #5224; there will also be some proxy work.
This commit is contained in:
@@ -272,11 +272,11 @@ func (rs *REST) createExternalLoadBalancer(ctx api.Context, service *api.Service
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ip, err := balancer.CreateTCPLoadBalancer(name, zone.Region, nil, service.Spec.Port, hostsFromMinionList(hosts), affinityType)
|
||||
endpoint, err := balancer.CreateTCPLoadBalancer(name, zone.Region, nil, service.Spec.Port, hostsFromMinionList(hosts), affinityType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
service.Spec.PublicIPs = []string{ip.String()}
|
||||
service.Spec.PublicIPs = []string{endpoint}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user