Skip to content

Commit

Permalink
fix: do not recreate port for terminating pods (#1409)
Browse files Browse the repository at this point in the history
When node is not ready lots of pods may stay in `Terminating` status. The inspection previously will always put the pods into addQueue which will waste lots of cpu.
  • Loading branch information
oilbeater committed Mar 28, 2022
1 parent 9587ad4 commit a378fad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/inspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ func (c *Controller) inspectPod() error {
if pod.Spec.HostNetwork {
continue
}

if !isPodAlive(pod) {
continue
}

podName := c.getNameByPod(pod)
podNets, err := c.getPodKubeovnNets(pod)
if err != nil {
Expand Down

0 comments on commit a378fad

Please sign in to comment.