hako 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/hako/container.rb +10 -1
- data/lib/hako/schedulers/ecs_definition_comparator.rb +11 -1
- data/lib/hako/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f272b12fda08e6fef5e8f28413f35320747a70
|
4
|
+
data.tar.gz: e632e91834a590ec1e22e3a656d2e18d182e2639
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e0bae90082a189252c38c9840791d8fbea6acf1efc6559ebc8b213ce8618f6bef42a290a5b30968b825691407619d9950efff0fcfe0897ef0755c672203a52b
|
7
|
+
data.tar.gz: c5e09e51d46695484ef68ad02504f8a4ec0f1879c74b289b6b85f40a145f1638f0dc32b8fa9c68f6c71347c70b37232f2b7d79f17e197548acf9b1aaf6e037f6
|
data/lib/hako/container.rb
CHANGED
@@ -18,7 +18,6 @@ module Hako
|
|
18
18
|
cpu
|
19
19
|
memory
|
20
20
|
links
|
21
|
-
mount_points
|
22
21
|
].each do |name|
|
23
22
|
define_method(name) do
|
24
23
|
@definition[name]
|
@@ -33,6 +32,16 @@ module Hako
|
|
33
32
|
@expanded_env ||= expand_env(@definition.fetch('env', {}))
|
34
33
|
end
|
35
34
|
|
35
|
+
def mount_points
|
36
|
+
@definition['mount_points'].map do |mount_point|
|
37
|
+
{
|
38
|
+
source_volume: mount_point.fetch('source_volume'),
|
39
|
+
container_path: mount_point.fetch('container_path'),
|
40
|
+
read_only: mount_point.fetch('read_only', false),
|
41
|
+
}
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
36
45
|
private
|
37
46
|
|
38
47
|
PROVIDERS_KEY = '$providers'
|
@@ -6,9 +6,10 @@ module Hako
|
|
6
6
|
@expected_container = expected_container
|
7
7
|
end
|
8
8
|
|
9
|
-
CONTAINER_KEYS = %i[image cpu memory links docker_labels
|
9
|
+
CONTAINER_KEYS = %i[image cpu memory links docker_labels].freeze
|
10
10
|
PORT_MAPPING_KEYS = %i[container_port host_port protocol].freeze
|
11
11
|
ENVIRONMENT_KEYS = %i[name value].freeze
|
12
|
+
MOUNT_POINT_KEYS = %i[source_volume container_path read_only].freeze
|
12
13
|
|
13
14
|
def different?(actual_container)
|
14
15
|
unless actual_container
|
@@ -34,6 +35,15 @@ module Hako
|
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
38
|
+
if @expected_container[:mount_points].size != actual_container.mount_points.size
|
39
|
+
return true
|
40
|
+
end
|
41
|
+
@expected_container[:mount_points].zip(actual_container.mount_points) do |e, a|
|
42
|
+
if different_members?(e, a, MOUNT_POINT_KEYS)
|
43
|
+
return true
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
37
47
|
false
|
38
48
|
end
|
39
49
|
|
data/lib/hako/version.rb
CHANGED