kuber_kit 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/kuber_kit/actions/service_deployer.rb +15 -3
- data/lib/kuber_kit/core/configuration.rb +5 -3
- data/lib/kuber_kit/core/configuration_definition.rb +7 -0
- data/lib/kuber_kit/core/configuration_factory.rb +1 -0
- data/lib/kuber_kit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15dac677730506e10fbb09705224f68c82e625a389bfbbab92f0292d26599ebb
|
4
|
+
data.tar.gz: '09d78c4155e4b625935b263969a21361093100b004da34741a671f579f79450f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e82d1c7dfd78ecea8b00939ca04f75c189ac336f84f69b811613db6e272a821c66202cf882081344cd920153f00f99d5c74ebe2962b771619361380fed076a4b
|
7
|
+
data.tar.gz: af22dfcb438f9862adcbd4165ddf608c0db0c4580d7ae5b3a0b810d83193ce6caeb28a40671d58d4f064876058ae4a8503350c47a7e5ccc9f3efe1bcd06fc4b8
|
data/CHANGELOG.md
CHANGED
@@ -28,9 +28,10 @@ class KuberKit::Actions::ServiceDeployer
|
|
28
28
|
services, tags = deployment_options_selector.call()
|
29
29
|
end
|
30
30
|
|
31
|
-
default_services = current_configuration.default_services.map(&:to_s)
|
32
31
|
disabled_services = current_configuration.disabled_services.map(&:to_s)
|
33
32
|
disabled_services += skip_services if skip_services
|
33
|
+
default_services = current_configuration.default_services.map(&:to_s) - disabled_services
|
34
|
+
initial_services = current_configuration.initial_services.map(&:to_s) - disabled_services
|
34
35
|
|
35
36
|
service_names = service_list_resolver.resolve(
|
36
37
|
services: services || [],
|
@@ -64,9 +65,20 @@ class KuberKit::Actions::ServiceDeployer
|
|
64
65
|
return false unless compilation_result && compilation_result.succeeded?
|
65
66
|
end
|
66
67
|
|
68
|
+
# First deploy initial services.
|
69
|
+
# This feature is used to deploy some services, required for deployment of other services, e.g. env files
|
70
|
+
# Note: Initial services are deployed without dependencies
|
71
|
+
initial_services.map(&:to_sym).each_slice(configs.deploy_simultaneous_limit) do |batch_service_names|
|
72
|
+
ui.print_debug("ServiceDeployer", "Scheduling to compile: #{batch_service_names.inspect}. Limit: #{configs.deploy_simultaneous_limit}")
|
73
|
+
|
74
|
+
if deployment_result.succeeded?
|
75
|
+
deploy_simultaneously(batch_service_names, deployment_result)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
67
79
|
if skip_dependencies
|
68
80
|
service_names.each_slice(configs.deploy_simultaneous_limit) do |batch_service_names|
|
69
|
-
ui.print_debug("ServiceDeployer", "Scheduling to
|
81
|
+
ui.print_debug("ServiceDeployer", "Scheduling to deploy: #{batch_service_names.inspect}. Limit: #{configs.deploy_simultaneous_limit}")
|
70
82
|
|
71
83
|
if deployment_result.succeeded?
|
72
84
|
deploy_simultaneously(batch_service_names, deployment_result)
|
@@ -74,7 +86,7 @@ class KuberKit::Actions::ServiceDeployer
|
|
74
86
|
end
|
75
87
|
else
|
76
88
|
service_dependency_resolver.each_with_deps(service_names) do |dep_service_names|
|
77
|
-
ui.print_debug("ServiceDeployer", "Scheduling to
|
89
|
+
ui.print_debug("ServiceDeployer", "Scheduling to deploy: #{dep_service_names.inspect}. Limit: #{configs.deploy_simultaneous_limit}")
|
78
90
|
|
79
91
|
if deployment_result.succeeded?
|
80
92
|
deploy_simultaneously(dep_service_names, deployment_result)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class KuberKit::Core::Configuration
|
2
2
|
attr_reader :name, :artifacts, :registries, :env_files, :templates, :kubeconfig_path,
|
3
|
-
:services_attributes, :enabled_services, :disabled_services, :default_services,
|
4
|
-
:build_servers, :global_build_vars,
|
3
|
+
:services_attributes, :enabled_services, :disabled_services, :default_services,
|
4
|
+
:initial_services, :build_servers, :global_build_vars,
|
5
5
|
:deployer_strategy, :deployer_namespace, :deployer_require_confirmation
|
6
6
|
|
7
7
|
Contract KeywordArgs[
|
@@ -15,6 +15,7 @@ class KuberKit::Core::Configuration
|
|
15
15
|
enabled_services: ArrayOf[Symbol],
|
16
16
|
disabled_services: ArrayOf[Symbol],
|
17
17
|
default_services: ArrayOf[Symbol],
|
18
|
+
initial_services: ArrayOf[Symbol],
|
18
19
|
build_servers: ArrayOf[KuberKit::Core::BuildServers::AbstractBuildServer],
|
19
20
|
global_build_vars: HashOf[Symbol => Any],
|
20
21
|
deployer_strategy: Symbol,
|
@@ -23,7 +24,7 @@ class KuberKit::Core::Configuration
|
|
23
24
|
] => Any
|
24
25
|
def initialize(name:, artifacts:, registries:, env_files:, templates:, kubeconfig_path:,
|
25
26
|
services_attributes:, enabled_services:, disabled_services:, default_services:,
|
26
|
-
build_servers:, global_build_vars:,
|
27
|
+
initial_services:, build_servers:, global_build_vars:,
|
27
28
|
deployer_strategy:, deployer_namespace:, deployer_require_confirmation:)
|
28
29
|
@name = name
|
29
30
|
@artifacts = artifacts
|
@@ -36,6 +37,7 @@ class KuberKit::Core::Configuration
|
|
36
37
|
@enabled_services = enabled_services
|
37
38
|
@disabled_services = disabled_services
|
38
39
|
@default_services = default_services
|
40
|
+
@initial_services = initial_services
|
39
41
|
@global_build_vars = global_build_vars
|
40
42
|
@deployer_strategy = deployer_strategy
|
41
43
|
@deployer_namespace = deployer_namespace
|
@@ -14,6 +14,7 @@ class KuberKit::Core::ConfigurationDefinition
|
|
14
14
|
@enabled_services = []
|
15
15
|
@disabled_services = []
|
16
16
|
@default_services = []
|
17
|
+
@initial_services = []
|
17
18
|
@services_attributes = {}
|
18
19
|
end
|
19
20
|
|
@@ -28,6 +29,7 @@ class KuberKit::Core::ConfigurationDefinition
|
|
28
29
|
enabled_services: @enabled_services,
|
29
30
|
disabled_services: @disabled_services,
|
30
31
|
default_services: @default_services,
|
32
|
+
initial_services: @initial_services,
|
31
33
|
build_servers: @build_servers,
|
32
34
|
services_attributes: @services_attributes,
|
33
35
|
global_build_vars: @global_build_vars,
|
@@ -126,6 +128,11 @@ class KuberKit::Core::ConfigurationDefinition
|
|
126
128
|
return self
|
127
129
|
end
|
128
130
|
|
131
|
+
def initial_services(services)
|
132
|
+
@initial_services += services.map(&:to_sym)
|
133
|
+
return self
|
134
|
+
end
|
135
|
+
|
129
136
|
def disabled_services(services)
|
130
137
|
@disabled_services += services.map(&:to_sym)
|
131
138
|
return self
|
@@ -31,6 +31,7 @@ class KuberKit::Core::ConfigurationFactory
|
|
31
31
|
enabled_services: configuration_attrs.enabled_services,
|
32
32
|
disabled_services: configuration_attrs.disabled_services,
|
33
33
|
default_services: configuration_attrs.default_services,
|
34
|
+
initial_services: configuration_attrs.initial_services,
|
34
35
|
global_build_vars: configuration_attrs.global_build_vars || {},
|
35
36
|
deployer_strategy: configuration_attrs.deployer_strategy || configs.deployer_strategy,
|
36
37
|
deployer_namespace: configuration_attrs.deployer_namespace,
|
data/lib/kuber_kit/version.rb
CHANGED