Fix integer division

This commit is contained in:
Hanna Lee 2021-07-15 14:46:12 -04:00 committed by Antonio Ojea
parent 6c357f9996
commit 979c4254eb

View File

@ -68,7 +68,7 @@ func estimateMaximumPods(c clientset.Interface, min, max int32) int32 {
availablePods += 10
}
//avoid creating exactly max pods
availablePods *= 8 / 10
availablePods = int32(float32(availablePods) * 8.0 / 10.0)
// bound the top and bottom
if availablePods > max {
availablePods = max