lib/hako/schedulers/ecs.rb in hako-2.0.4 vs lib/hako/schedulers/ecs.rb in hako-2.1.0

- old
+ new

@@ -41,10 +41,11 @@ if @network_mode == 'awsvpc' && @ecs_elb_v2_options # awsvpc network mode requires ELB target group with target_type=ip @ecs_elb_v2_options['target_type'] = 'ip' end @dynamic_port_mapping = options.fetch('dynamic_port_mapping', @ecs_elb_options.nil?) + @health_check_grace_period_seconds = options.fetch('health_check_grace_period_seconds', nil) if options.key?('autoscaling') @autoscaling = EcsAutoscaling.new(options.fetch('autoscaling'), @region, dry_run: @dry_run) end @autoscaling_group_for_oneshot = options.fetch('autoscaling_group_for_oneshot', nil) @autoscaling_topic_for_oneshot = options.fetch('autoscaling_topic_for_oneshot', nil) @@ -773,10 +774,11 @@ desired_count: @desired_count, task_definition: task_definition_arn, deployment_configuration: @deployment_configuration, platform_version: @platform_version, network_configuration: @network_configuration, + health_check_grace_period_seconds: @health_check_grace_period_seconds, } if @autoscaling # Keep current desired_count if autoscaling is enabled params[:desired_count] = current_service.desired_count end @@ -802,9 +804,10 @@ placement_constraints: @placement_constraints, placement_strategy: @placement_strategy, launch_type: @launch_type, platform_version: @platform_version, network_configuration: @network_configuration, + health_check_grace_period_seconds: @health_check_grace_period_seconds, } if ecs_elb_client.find_or_create_load_balancer(front_port) ecs_elb_client.modify_attributes params[:load_balancers] = [ecs_elb_client.load_balancer_params_for_service] end