Skip to content

Commit bce5b04

Browse files
committed
fix ip statistics in subnet status (#2769)
1 parent 6b4786b commit bce5b04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/controller/pod.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,8 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
697697
}
698698
}
699699

700+
c.ipam.ReleaseAddressByPod(key)
701+
700702
for _, port := range ports {
701703
sgs, err := c.getPortSg(&port)
702704
if err != nil {
@@ -723,7 +725,6 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
723725
klog.Errorf("failed to delete attach ip for pod %v, %v, please delete attach ip manually", pod.Name, err)
724726
}
725727
}
726-
c.ipam.ReleaseAddressByPod(key)
727728
return nil
728729
}
729730

0 commit comments

Comments
 (0)