Skip to content
Snippets Groups Projects
Commit 19162915 authored by Gede Wahyu's avatar Gede Wahyu Committed by Alex Ellis
Browse files

Remove the differentiation between currentReplicas==1 and not


Signed-off-by: default avatarGede Wahyu <tokekbesi@gmail.com>
parent 81db6514
No related branches found
No related tags found
No related merge requests found
......@@ -100,14 +100,10 @@ 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
if currentReplicas+step > maxReplicas {
newReplicas = maxReplicas
} else {
if currentReplicas+step > maxReplicas {
newReplicas = maxReplicas
} else {
newReplicas = currentReplicas + step
}
newReplicas = currentReplicas + step
}
} else { // Resolved event.
newReplicas = minReplicas
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment