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
(cherry picked from commit 3bd1494)
  • Loading branch information
chestack authored and oilbeater committed Jun 1, 2021
1 parent 1bdff34 commit be20533
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@ func (c *Controller) handleDeletePod(key string) error {
return nil
}
pod, err := c.podsLister.Pods(namespace).Get(name)
if err != nil {
if !k8serrors.IsNotFound(err) {
return err
}
}
if pod != nil && pod.DeletionTimestamp == nil && isPodAlive(pod) {
// Pod with same name exists, just return here
return nil
Expand Down

0 comments on commit be20533

Please sign in to comment.