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 6b4786b commit bce5b04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,8 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
}
}

c.ipam.ReleaseAddressByPod(key)

for _, port := range ports {
sgs, err := c.getPortSg(&port)
if err != nil {
Expand All @@ -723,7 +725,6 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
klog.Errorf("failed to delete attach ip for pod %v, %v, please delete attach ip manually", pod.Name, err)
}
}
c.ipam.ReleaseAddressByPod(key)
return nil
}

Expand Down

0 comments on commit bce5b04

Please sign in to comment.