Skip to content

Commit

Permalink
BACKPORT: plugin: Fix scoring to use current resources (#426)
Browse files Browse the repository at this point in the history
The new behavior is what was originally intended, and should fix an
issue that we're observing in prod (currently it just scores based on
*size*, not *available resources*, which is... bad).
  • Loading branch information
sharnoff committed Jul 19, 2023
1 parent 95b83f3 commit 3ff4973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ func (e *AutoscaleEnforcer) Score(
return score, nil
}

totalMilliCpu := int64(node.totalReservableCPU())
totalMem := int64(node.totalReservableMemSlots())
totalMilliCpu := int64(node.remainingReservableCPU())
totalMem := int64(node.remainingReservableMemSlots())
maxTotalMilliCpu := int64(e.state.maxTotalReservableCPU)
maxTotalMem := int64(e.state.maxTotalReservableMemSlots)

Expand Down

0 comments on commit 3ff4973

Please sign in to comment.