Merge pull request #50973 from FengyunPan/fix-legacy-floatingip
Automatic merge from submit-queue (batch tested with PRs 50229, 50973, 50976, 51085, 51084) Fix legacy floatingip Fix #50974 If user specify floating-network-id by annotation rather than cloud provider file, openstack cloud provider don't delete floatingip when deleting LoadBalancer service. **Release note**: ```release-note NONE ```
This commit is contained in:
		@@ -1116,7 +1116,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancerDeleted(clusterName string, service *v1.
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if lbaas.opts.FloatingNetworkId != "" && loadbalancer != nil {
 | 
			
		||||
	if loadbalancer != nil && loadbalancer.VipPortID != "" {
 | 
			
		||||
		portID := loadbalancer.VipPortID
 | 
			
		||||
		floatingIP, err := getFloatingIPByPortID(lbaas.network, portID)
 | 
			
		||||
		if err != nil && err != ErrNotFound {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user