Skip to content

Commit

Permalink
fix: release ip addresses even if pods not found
Browse files Browse the repository at this point in the history
  • Loading branch information
chestack committed Jun 1, 2021
1 parent 0b43745 commit 3bd1494
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ func (c *Controller) handleDeletePod(key string) error {
}
pod, err := c.podsLister.Pods(namespace).Get(name)
if err != nil {
return nil
if !k8serrors.IsNotFound(err) {
return err
}
}
if pod != nil && pod.DeletionTimestamp == nil && isPodAlive(pod) {
// Pod with same name exists, just return here
Expand Down

0 comments on commit 3bd1494

Please sign in to comment.