hako 2.5.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/hako/container.rb +2 -0
- data/lib/hako/schedulers/ecs.rb +4 -5
- data/lib/hako/schedulers/ecs_autoscaling.rb +0 -18
- data/lib/hako/schedulers/ecs_definition_comparator.rb +1 -0
- data/lib/hako/schedulers/ecs_service_comparator.rb +1 -0
- data/lib/hako/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b787a7d8f621f8f8c1f9c36b4d2f6388d537c58eb33a3b0f5ff084864187b68
|
4
|
+
data.tar.gz: b274e28a64b66a768aa782e80d42d5a8193cd46e85b5125726bf755ceef512d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dbfbe813c945a3c566200681c436e0efc95580a60c5db7750d7d584e81b7963cd31dc1e284cfd020aca0ad4104f4f7820133dab0f524759ee30dc8d1db7397b
|
7
|
+
data.tar.gz: 6c91241388f94a031a411fd0cbfa896da13a9a1a55db717c6878f1a954cf93c680956dbef983e59d8947955bc2a43b8495f1e742cfb98491bf4e3c9eba901c22
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# 2.6.0 (2018-12-13)
|
2
|
+
## New features
|
3
|
+
- Support `essential` parameter for each container
|
4
|
+
- The default value remains `true`
|
5
|
+
|
6
|
+
## Bug fixes
|
7
|
+
- Stop trying to deregister non-existent scalable target on `hako remove`
|
8
|
+
- Update service when `health_check_grace_period_seconds` changes
|
9
|
+
|
1
10
|
# 2.5.1 (2018-11-29)
|
2
11
|
## Bug fixes
|
3
12
|
- Check secrets existence in dry-run mode
|
data/lib/hako/container.rb
CHANGED
@@ -26,6 +26,7 @@ module Hako
|
|
26
26
|
memory
|
27
27
|
memory_reservation
|
28
28
|
links
|
29
|
+
essential
|
29
30
|
command
|
30
31
|
user
|
31
32
|
privileged
|
@@ -221,6 +222,7 @@ module Hako
|
|
221
222
|
'env' => {},
|
222
223
|
'docker_labels' => {},
|
223
224
|
'links' => [],
|
225
|
+
'essential' => true,
|
224
226
|
'mount_points' => [],
|
225
227
|
'port_mappings' => [],
|
226
228
|
'volumes_from' => [],
|
data/lib/hako/schedulers/ecs.rb
CHANGED
@@ -45,7 +45,9 @@ module Hako
|
|
45
45
|
@ecs_elb_v2_options['target_type'] = 'ip'
|
46
46
|
end
|
47
47
|
@dynamic_port_mapping = options.fetch('dynamic_port_mapping', @ecs_elb_options.nil?)
|
48
|
-
@health_check_grace_period_seconds = options.fetch('health_check_grace_period_seconds'
|
48
|
+
@health_check_grace_period_seconds = options.fetch('health_check_grace_period_seconds') do
|
49
|
+
@ecs_elb_options || @ecs_elb_v2_options ? 0 : nil
|
50
|
+
end
|
49
51
|
if options.key?('autoscaling')
|
50
52
|
@autoscaling = EcsAutoscaling.new(options.fetch('autoscaling'), @region, ecs_elb_client, dry_run: @dry_run)
|
51
53
|
end
|
@@ -303,9 +305,6 @@ module Hako
|
|
303
305
|
ecs_client.delete_service(cluster: service.cluster_arn, service: service.service_arn)
|
304
306
|
Hako.logger.info "#{service.service_arn} is deleted"
|
305
307
|
end
|
306
|
-
if @autoscaling
|
307
|
-
@autoscaling.remove(service)
|
308
|
-
end
|
309
308
|
else
|
310
309
|
puts "Service #{@app_id} doesn't exist"
|
311
310
|
end
|
@@ -599,7 +598,7 @@ module Hako
|
|
599
598
|
memory_reservation: container.memory_reservation,
|
600
599
|
links: container.links,
|
601
600
|
port_mappings: container.port_mappings,
|
602
|
-
essential:
|
601
|
+
essential: container.essential,
|
603
602
|
environment: environment,
|
604
603
|
secrets: container.secrets,
|
605
604
|
docker_labels: container.docker_labels,
|
@@ -113,24 +113,6 @@ module Hako
|
|
113
113
|
nil
|
114
114
|
end
|
115
115
|
|
116
|
-
# @param [Aws::ECS::Types::Service] service
|
117
|
-
# @return [nil]
|
118
|
-
def remove(service)
|
119
|
-
resource_id = service_resource_id(service)
|
120
|
-
service_namespace = 'ecs'
|
121
|
-
scalable_dimension = 'ecs:service:DesiredCount'
|
122
|
-
|
123
|
-
Hako.logger.info("Deregister scalable target #{resource_id} and its policies")
|
124
|
-
unless @dry_run
|
125
|
-
begin
|
126
|
-
autoscaling_client.deregister_scalable_target(service_namespace: service_namespace, resource_id: resource_id, scalable_dimension: scalable_dimension)
|
127
|
-
rescue Aws::ApplicationAutoScaling::Errors::ObjectNotFoundException => e
|
128
|
-
Hako.logger.warn(e)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
nil
|
132
|
-
end
|
133
|
-
|
134
116
|
# @param [Aws::ECS::Types::Service] service
|
135
117
|
# @return [nil]
|
136
118
|
def status(service)
|
@@ -26,6 +26,7 @@ module Hako
|
|
26
26
|
struct.member(:memory, Schema::Nullable.new(Schema::Integer.new))
|
27
27
|
struct.member(:memory_reservation, Schema::Nullable.new(Schema::Integer.new))
|
28
28
|
struct.member(:links, Schema::UnorderedArray.new(Schema::String.new))
|
29
|
+
struct.member(:essential, Schema::Boolean.new)
|
29
30
|
struct.member(:port_mappings, Schema::UnorderedArray.new(port_mapping_schema))
|
30
31
|
struct.member(:environment, Schema::UnorderedArray.new(environment_schema))
|
31
32
|
struct.member(:secrets, Schema::Nullable.new(Schema::UnorderedArray.new(secrets_schema)))
|
@@ -25,6 +25,7 @@ module Hako
|
|
25
25
|
struct.member(:deployment_configuration, Schema::WithDefault.new(deployment_configuration_schema, default_configuration))
|
26
26
|
struct.member(:platform_version, Schema::String.new)
|
27
27
|
struct.member(:network_configuration, Schema::Nullable.new(network_configuration_schema))
|
28
|
+
struct.member(:health_check_grace_period_seconds, Schema::Nullable.new(Schema::Integer.new))
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
data/lib/hako/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hako
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-applicationautoscaling
|