Skip to content

Commit

Permalink
tmp: Add back comment about buffer when scaling enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sharnoff committed May 4, 2024
1 parent caba29f commit b3f2d70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/plugin/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,8 @@ func (e *AutoscaleEnforcer) reserveResources(
Max: vmInfo.Max().Mem,
}

// If scaling isn't enabled *or* the pod is involved in an ongoing migration, then we can be
// more precise about usage (because scaling is forbidden while migrating).
migrating := util.TryPodOwnerVirtualMachineMigration(pod) != nil
if !vmInfo.Config.ScalingEnabled || migrating {
cpuState.Buffer = 0
Expand Down

0 comments on commit b3f2d70

Please sign in to comment.