Skip to content

Commit

Permalink
pap: trivial - skip when 0 pod to evict
Browse files Browse the repository at this point in the history
  • Loading branch information
h-w-chen committed Sep 25, 2024
1 parent 46aafd2 commit 953dd78
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func (l loadEvictor) Evict(ctx context.Context, targetPercent int) {
return
}
countToEvict := len(pods) * targetPercent / 100
if countToEvict == 0 {
general.InfofV(6, "pap: evict: skip 0 to evict")
return
}

bePods, err := l.podFetcher.GetPodList(ctx, l.isBE)
if err != nil {
Expand Down

0 comments on commit 953dd78

Please sign in to comment.