lib/capistrano/asg/rolling/autoscale_group.rb in capistrano-asg-rolling-0.2.1 vs lib/capistrano/asg/rolling/autoscale_group.rb in capistrano-asg-rolling-0.3.0
- old
+ new
@@ -38,10 +38,14 @@
def instance_warmup_time
aws_autoscaling_group.health_check_grace_period
end
+ def healthy_percentage
+ properties.fetch(:healthy_percentage, 100)
+ end
+
def start_instance_refresh(launch_template)
aws_autoscaling_client.start_instance_refresh(
auto_scaling_group_name: name,
strategy: 'Rolling',
desired_configuration: {
@@ -50,10 +54,10 @@
version: launch_template.version
}
},
preferences: {
instance_warmup: instance_warmup_time,
- min_healthy_percentage: 100,
+ min_healthy_percentage: healthy_percentage,
skip_matching: true
}
)
rescue Aws::AutoScaling::Errors::InstanceRefreshInProgress => e
raise Capistrano::ASG::Rolling::InstanceRefreshFailed, e