Skip to content

Commit

Permalink
fix ip statistics in subnet status (#2769)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed May 9, 2023
1 parent d3d0176 commit 62d8122
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/pod.go
Expand Up @@ -918,6 +918,9 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
return err
}
}

c.ipam.ReleaseAddressByPod(key)

podNets, err := c.getPodKubeovnNets(pod)
if err != nil {
klog.Errorf("failed to get pod nets %v", err)
Expand All @@ -935,7 +938,6 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
}
}
}
c.ipam.ReleaseAddressByPod(key)
for _, podNet := range podNets {
c.syncVirtualPortsQueue.Add(podNet.Subnet.Name)
}
Expand Down

0 comments on commit 62d8122

Please sign in to comment.