mirror of https://github.com/k3s-io/k3s
Fixup openstack cloud provider loadbalancer deletion error
This change enables ```getLoadBalancer``` to return the loadbalancer even if no floating ip is associated to the VIP port of the loadbalancer. Signed-off-by: Eunsoo Park <esevan.park@gmail.com>pull/8/head
parent
058b26f38e
commit
da5618e66b
|
@ -474,10 +474,13 @@ func (lbaas *LbaasV2) GetLoadBalancer(ctx context.Context, clusterName string, s
|
|||
portID := loadbalancer.VipPortID
|
||||
if portID != "" {
|
||||
floatIP, err := getFloatingIPByPortID(lbaas.network, portID)
|
||||
if err != nil {
|
||||
if err != nil && err != ErrNotFound {
|
||||
return nil, false, fmt.Errorf("error getting floating ip for port %s: %v", portID, err)
|
||||
}
|
||||
status.Ingress = []v1.LoadBalancerIngress{{IP: floatIP.FloatingIP}}
|
||||
|
||||
if floatIP != nil {
|
||||
status.Ingress = []v1.LoadBalancerIngress{{IP: floatIP.FloatingIP}}
|
||||
}
|
||||
} else {
|
||||
status.Ingress = []v1.LoadBalancerIngress{{IP: loadbalancer.VipAddress}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue