mirror of https://github.com/k3s-io/k3s
Fix panic in GCE loadbalancer library
parent
58fca39de3
commit
94b6a1fb70
|
@ -344,7 +344,10 @@ func (gce *GCECloud) ensureExternalLoadBalancerDeleted(clusterName, clusterID st
|
|||
glog.Infof("ensureExternalLoadBalancerDeleted(%s): Failed to retrieve health check:%v.", lbRefStr, err)
|
||||
return err
|
||||
}
|
||||
hcNames = append(hcNames, hcToDelete.Name)
|
||||
// If we got 'StatusNotFound' LB was already deleted and it's safe to ignore.
|
||||
if err == nil {
|
||||
hcNames = append(hcNames, hcToDelete.Name)
|
||||
}
|
||||
} else {
|
||||
// EnsureLoadBalancerDeleted() could be triggered by changing service from
|
||||
// LoadBalancer type to others. In this case we have no idea whether it was
|
||||
|
|
Loading…
Reference in New Issue