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 @@ -1788,6 +1788,7 @@ func (c *Controller) getNameByPod(pod *v1.Pod) string {
1788
1788
return pod .Name
1789
1789
}
1790
1790
1791
+ // 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.
1791
1792
func (c * Controller ) getNsAvailableSubnets (pod * v1.Pod , podNet * kubeovnNet ) ([]* kubeovnNet , error ) {
1792
1793
var result []* kubeovnNet
1793
1794
// keep the annotation subnet of the pod in first position
@@ -1813,19 +1814,6 @@ func (c *Controller) getNsAvailableSubnets(pod *v1.Pod, podNet *kubeovnNet) ([]*
1813
1814
return nil , err
1814
1815
}
1815
1816
1816
- switch subnet .Spec .Protocol {
1817
- case kubeovnv1 .ProtocolIPv4 :
1818
- fallthrough
1819
- case kubeovnv1 .ProtocolDual :
1820
- if subnet .Status .V4AvailableIPs == 0 {
1821
- continue
1822
- }
1823
- case kubeovnv1 .ProtocolIPv6 :
1824
- if subnet .Status .V6AvailableIPs == 0 {
1825
- continue
1826
- }
1827
- }
1828
-
1829
1817
result = append (result , & kubeovnNet {
1830
1818
Type : providerTypeOriginal ,
1831
1819
ProviderName : subnet .Spec .Provider ,
You can’t perform that action at this time.
0 commit comments