lib/hako/schedulers/ecs.rb in hako-2.16.0 vs lib/hako/schedulers/ecs.rb in hako-2.17.0
- old
+ new
@@ -79,10 +79,17 @@
size_in_gi_b: ephemeral_storage.fetch('size_in_gi_b')
}
end
end
@requires_compatibilities = options.fetch('requires_compatibilities', nil)
+ if options.key?('runtime_platform')
+ runtime_platform = options.fetch('runtime_platform')
+ @runtime_platform = {
+ cpu_architecture: runtime_platform.fetch('cpu_architecture', nil),
+ operating_system_family: runtime_platform.fetch('operating_system_family', nil),
+ }
+ end
@launch_type = options.fetch('launch_type', nil)
if options.key?('capacity_provider_strategy')
@capacity_provider_strategy = options.fetch('capacity_provider_strategy').map do |strategy|
{
capacity_provider: strategy.fetch('capacity_provider'),
@@ -521,10 +528,13 @@
return true
end
if actual_definition.requires_compatibilities != @requires_compatibilities
return true
end
+ if actual_definition.runtime_platform != @runtime_platform
+ return true
+ end
if actual_definition.ephemeral_storage != @ephemeral_storage
return true
end
actual_tags_set = Set.new(actual_tags.map { |t| { key: t.key, value: t.value } })
@@ -564,10 +574,11 @@
execution_role_arn: @execution_role_arn,
network_mode: @network_mode,
container_definitions: definitions,
volumes: volumes_definition,
requires_compatibilities: @requires_compatibilities,
+ runtime_platform: @runtime_platform,
cpu: @cpu,
memory: @memory,
ephemeral_storage: @ephemeral_storage,
tags: @tags.empty? ? nil : @tags,
).task_definition
@@ -601,9 +612,10 @@
execution_role_arn: @execution_role_arn,
network_mode: @network_mode,
container_definitions: definitions,
volumes: volumes_definition,
requires_compatibilities: @requires_compatibilities,
+ runtime_platform: @runtime_platform,
cpu: @cpu,
memory: @memory,
ephemeral_storage: @ephemeral_storage,
tags: @tags.empty? ? nil : @tags,
).task_definition