Skip to content

Commit

Permalink
Fix: consider allocated replicas in rolling update
Browse files Browse the repository at this point in the history
  • Loading branch information
WVerlaek committed Feb 14, 2022
1 parent 914910e commit 7dba592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/fleets/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func (c *Controller) rollingUpdateRestFixedOnReady(ctx context.Context, fleet *a

// Check if we are ready to scale down
allPodsCount := agonesv1.SumSpecReplicas(allGSS)
newGSSUnavailablePodCount := active.Spec.Replicas - active.Status.ReadyReplicas
newGSSUnavailablePodCount := active.Spec.Replicas - active.Status.ReadyReplicas - active.Status.AllocatedReplicas
maxScaledDown := allPodsCount - minAvailable - newGSSUnavailablePodCount

if maxScaledDown <= 0 {
Expand Down

0 comments on commit 7dba592

Please sign in to comment.