kuber_kit 1.3.10 → 1.4.0
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/CHANGELOG.md +3 -0
- data/lib/kuber_kit/configs.rb +3 -2
- data/lib/kuber_kit/core/service_factory.rb +14 -2
- data/lib/kuber_kit/version.rb +1 -1
- data/lib/kuber_kit.rb +4 -0
- 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: ea4d7b887247997ba8a4bac8015836186d752612b6965ba58b3e5800ddd8661c
|
|
4
|
+
data.tar.gz: d884b7c596db6fb835995e30d6873283bdd359430dbce69263c33c548b46941e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97916e7cd453ea5b245b56700f60439736284a3deec759dc8f0b505b20ccbb2849998308e45adf0fa3440e0c48ed45a2bfcf98a2afb221836896d33d53f4e3be
|
|
7
|
+
data.tar.gz: 91af380e3e859112ed8bb19eb12911abd90edaf768389dd18d803ef0ab45a51f04327c9b9a401597ddcd0ec5fd6639cee009b624104e50349869c3b5f181b6b0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
**1.4.0**
|
|
2
|
+
- Added opt-in deep-merge for configuration service_attributes. When `KuberKit::Container["configs"].deep_merge_service_attributes = true`, nested hashes (e.g. `env`) from a configuration's `service_attributes` are merged into the service's definition attributes instead of replacing them entirely. Arrays are still replaced, not concatenated. Disabled by default — existing behavior is unchanged.
|
|
3
|
+
|
|
1
4
|
**1.3.8**
|
|
2
5
|
- Deploy initializers separately first even if they are part of the initially requested list of services
|
|
3
6
|
|
data/lib/kuber_kit/configs.rb
CHANGED
|
@@ -5,8 +5,8 @@ class KuberKit::Configs
|
|
|
5
5
|
:image_dockerfile_name, :image_build_context_dir, :image_tag, :docker_ignore_list, :image_compile_dir, :remote_image_compile_dir,
|
|
6
6
|
:kuber_kit_dirname, :kuber_kit_min_version, :images_dirname, :services_dirname, :infra_dirname, :configurations_dirname,
|
|
7
7
|
:artifact_clone_dir, :service_config_dir, :deployer_strategy, :compile_simultaneous_limit, :deploy_simultaneous_limit,
|
|
8
|
-
:additional_images_paths, :deprecation_warnings_disabled, :log_file_path, :env_file_compile_dir, :shell_launcher_strategy,
|
|
9
|
-
:shell_launcher_sets_configration, :generator_strategy
|
|
8
|
+
:additional_images_paths, :deprecation_warnings_disabled, :log_file_path, :env_file_compile_dir, :shell_launcher_strategy,
|
|
9
|
+
:shell_launcher_sets_configration, :generator_strategy, :deep_merge_service_attributes
|
|
10
10
|
]
|
|
11
11
|
DOCKER_IGNORE_LIST = [
|
|
12
12
|
'Dockerfile',
|
|
@@ -58,6 +58,7 @@ class KuberKit::Configs
|
|
|
58
58
|
set :deploy_simultaneous_limit, 5
|
|
59
59
|
set :additional_images_paths, []
|
|
60
60
|
set :deprecation_warnings_disabled, false
|
|
61
|
+
set :deep_merge_service_attributes, false
|
|
61
62
|
set :log_file_path, File.join(absolute_kuber_kit_path, "deploy.log")
|
|
62
63
|
set :env_file_compile_dir, File.join(absolute_kuber_kit_path, "env_files")
|
|
63
64
|
set :shell_launcher_sets_configration, true
|
|
@@ -3,7 +3,12 @@ class KuberKit::Core::ServiceFactory
|
|
|
3
3
|
service_attrs = definition.to_service_attrs
|
|
4
4
|
|
|
5
5
|
configuration_attributes = KuberKit.current_configuration.service_attributes(service_attrs.name)
|
|
6
|
-
|
|
6
|
+
base_attributes = service_attrs.attributes || {}
|
|
7
|
+
attributes = if KuberKit.deep_merge_service_attributes?
|
|
8
|
+
deep_merge(base_attributes, configuration_attributes)
|
|
9
|
+
else
|
|
10
|
+
base_attributes.merge(configuration_attributes)
|
|
11
|
+
end
|
|
7
12
|
|
|
8
13
|
KuberKit::Core::Service.new(
|
|
9
14
|
name: service_attrs.name,
|
|
@@ -16,4 +21,11 @@ class KuberKit::Core::ServiceFactory
|
|
|
16
21
|
generator_strategy: service_attrs.generator_strategy,
|
|
17
22
|
)
|
|
18
23
|
end
|
|
19
|
-
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
def deep_merge(base, override)
|
|
27
|
+
base.merge(override) do |_key, a, b|
|
|
28
|
+
a.is_a?(Hash) && b.is_a?(Hash) ? deep_merge(a, b) : b
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
data/lib/kuber_kit/version.rb
CHANGED
data/lib/kuber_kit.rb
CHANGED
|
@@ -281,6 +281,10 @@ module KuberKit
|
|
|
281
281
|
Container["configs"].deprecation_warnings_disabled
|
|
282
282
|
end
|
|
283
283
|
|
|
284
|
+
def deep_merge_service_attributes?
|
|
285
|
+
Container["configs"].deep_merge_service_attributes
|
|
286
|
+
end
|
|
287
|
+
|
|
284
288
|
def current_configuration
|
|
285
289
|
if @configuration_name.nil?
|
|
286
290
|
raise "Please set configuration name before calling current_configuration"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kuber_kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Iskander Khaziev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-05-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: contracts
|