Skip to content

Commit

Permalink
fix autoscaling down check when desiredcapacity == maxcapacity
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Mar 23, 2018
1 parent d37c9e0 commit b3c4722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/autoscaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (c *AutoscalingController) processEcsMessage(message ecs.SNSPayloadEcs) err
}
}
// make scaling (down) decision
if desiredCapacity > minSize && resourcesFitGlobal {
if desiredCapacity > minSize && (resourcesFitGlobal || desiredCapacity == maxSize) {
hasFreeResourcesGlobal := c.scaleDownDecision(clusterName, dc.ContainerInstances, registeredInstanceCpu, registeredInstanceMemory, cpuNeeded, memoryNeeded)
if hasFreeResourcesGlobal {
// check cooldown period
Expand Down

0 comments on commit b3c4722

Please sign in to comment.