Remove the differentiation between currentReplicas==1 and not
@@ -100,15 +100,11 @@ func CalculateReplicas(status string, currentReplicas uint64, maxReplicas uint64
step := uint64((float64(maxReplicas) / 100) * float64(scalingFactor))
if status == "firing" && step > 0 {
- if currentReplicas == 1 {
- newReplicas = step
- } else {
if currentReplicas+step > maxReplicas {
newReplicas = maxReplicas
} else {
newReplicas = currentReplicas + step
}
- }
} else { // Resolved event.
newReplicas = minReplicas
}
