Skip to content

Commit

Permalink
Scale resources via their milli value
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckal777 committed Sep 19, 2023
1 parent 48f938d commit 5ce026a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controllers/vpa_runnable.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,5 @@ func maxByMemory(nodes []corev1.Node) corev1.Node {
}

func scaleQuantity(q *resource.Quantity, percent int64) *resource.Quantity {
return resource.NewQuantity(q.Value()*percent/scaleDivisor, q.Format)
return resource.NewMilliQuantity(q.MilliValue()*percent/scaleDivisor, q.Format)
}

0 comments on commit 5ce026a

Please sign in to comment.