Skip to content

Commit

Permalink
go fumpt
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Szwaj <[email protected]>
  • Loading branch information
cnvergence committed Dec 30, 2024
1 parent c31bf6b commit 464c30a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ func (c *Controller) acquireAddress(pod *v1.Pod, podNet *kubeovnNet) (string, st

switch podNet.Subnet.Spec.Protocol {
case kubeovnv1.ProtocolDual:
if ippool.Status.V4AvailableIPs.Int64() == 0 && ippool.Status.V6AvailableIPs.Int64() == 0 {
if ippool.Status.V4AvailableIPs.Int64() == 0 || ippool.Status.V6AvailableIPs.Int64() == 0 {
continue
}
case kubeovnv1.ProtocolIPv4:
Expand All @@ -1673,6 +1673,7 @@ func (c *Controller) acquireAddress(pod *v1.Pod, podNet *kubeovnNet) (string, st

if ippool.Spec.Subnet == podNet.Subnet.Name {
ippoolStr = ippool.Name
break
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions test/e2e/kube-ovn/ipam/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ var _ = framework.Describe("[group:ipam]", func() {
framework.ExpectIPInCIDR(pod.Annotations[util.IPAddressAnnotation], subnet.Spec.CIDRBlock)
framework.ExpectMAC(pod.Annotations[util.MacAddressAnnotation])
framework.ExpectHaveKeyWithValue(pod.Annotations, util.RoutedAnnotation, "true")
for _, ip := range util.PodIPs(pod) {
framework.ExpectContainElement(append(ipsRange1, ipsRange2...), ip)
}
}

ginkgo.By("Creating second statefulset " + stsName2 + " with logical switch annotation and no ippool annotation")
Expand All @@ -605,6 +608,9 @@ var _ = framework.Describe("[group:ipam]", func() {
framework.ExpectIPInCIDR(pod.Annotations[util.IPAddressAnnotation], subnet.Spec.CIDRBlock)
framework.ExpectMAC(pod.Annotations[util.MacAddressAnnotation])
framework.ExpectHaveKeyWithValue(pod.Annotations, util.RoutedAnnotation, "true")
for _, ip := range util.PodIPs(pod) {
framework.ExpectContainElement(append(ipsRange1, ipsRange2...), ip)
}
}
})
})
1 change: 0 additions & 1 deletion test/e2e/multus/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ var _ = framework.SerialDescribe("[group:multus]", func() {
})

framework.ConformanceIt("should be able to use mac and ip provided by k8s.v1.cni.cncf.io/networks annotation", func() {

if f.VersionPriorTo(1, 13) {
ginkgo.Skip("this feature is supported from version 1.13")
}
Expand Down

0 comments on commit 464c30a

Please sign in to comment.