Skip to content

Commit

Permalink
Fix list ip api regression introduced by tkestack#120
Browse files Browse the repository at this point in the history
After tkestack#120, list ip api lists deployment and pool ip which empty podName as releasable=false
which is a regression
  • Loading branch information
chenchun committed Jan 5, 2021
1 parent 257349a commit b7e4839
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/ipam/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ func (c *Controller) checkReleasableAndStatus(fip *FloatingIP) (releasable bool,
return
}
}
if fip.PodName == "" && fip.AppName == "" && fip.PoolName == "" {
return
}
if fip.PodName == "" {
releasable = true
status = "Deleted"
return
}
pod, err := c.podLister.Pods(fip.Namespace).Get(fip.PodName)
Expand Down

0 comments on commit b7e4839

Please sign in to comment.