Skip to content

Commit

Permalink
Merge pull request #12 from callum-bond/master
Browse files Browse the repository at this point in the history
parameterise ASG update policy's pause time
  • Loading branch information
Samseppiol authored Mar 24, 2021
2 parents 1b6de8e + 640f800 commit 3d70d5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eks-cluster.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,13 @@
{ Key: 'k8s.io/cluster-autoscaler/enabled', Value: Ref('EnableScaling') }
]
asg_tags = tags.clone.map(&:clone).concat(asg_tags).uniq.each {|tag| tag[:PropagateAtLaunch] = false }
pause_time = external_parameters.fetch(:pause_time, 'PT5M')
AutoScaling_AutoScalingGroup(:EksNodeAutoScalingGroup) {
UpdatePolicy(:AutoScalingRollingUpdate, {
MaxBatchSize: '1',
MinInstancesInService: FnIf('SpotEnabled', 0, Ref('DesiredCapacity')),
SuspendProcesses: %w(HealthCheck ReplaceUnhealthy AZRebalance AlarmNotification ScheduledActions),
PauseTime: 'PT5M'
PauseTime: pause_time
})
DesiredCapacity Ref('DesiredCapacity')
MinSize Ref('MinSize')
Expand Down

0 comments on commit 3d70d5a

Please sign in to comment.