File tree 1 file changed +1
-13
lines changed
1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -1709,6 +1709,7 @@ func (c *Controller) getNameByPod(pod *v1.Pod) string {
1709
1709
return pod .Name
1710
1710
}
1711
1711
1712
+ // When subnet's v4availableIPs is 0 but still there's available ip in exclude-ips, the static ip in exclude-ips can be allocated normal.
1712
1713
func (c * Controller ) getNsAvailableSubnets (pod * v1.Pod , podNet * kubeovnNet ) ([]* kubeovnNet , error ) {
1713
1714
var result []* kubeovnNet
1714
1715
// keep the annotation subnet of the pod in first position
@@ -1734,19 +1735,6 @@ func (c *Controller) getNsAvailableSubnets(pod *v1.Pod, podNet *kubeovnNet) ([]*
1734
1735
return nil , err
1735
1736
}
1736
1737
1737
- switch subnet .Spec .Protocol {
1738
- case kubeovnv1 .ProtocolIPv4 :
1739
- fallthrough
1740
- case kubeovnv1 .ProtocolDual :
1741
- if subnet .Status .V4AvailableIPs == 0 {
1742
- continue
1743
- }
1744
- case kubeovnv1 .ProtocolIPv6 :
1745
- if subnet .Status .V6AvailableIPs == 0 {
1746
- continue
1747
- }
1748
- }
1749
-
1750
1738
result = append (result , & kubeovnNet {
1751
1739
Type : providerTypeOriginal ,
1752
1740
ProviderName : subnet .Spec .Provider ,
You can’t perform that action at this time.
0 commit comments