kuber_kit 1.3.6 → 1.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +1 -1
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/lib/kuber_kit/actions/service_deployer.rb +2 -1
- data/lib/kuber_kit/core/dependencies/abstract_dependency_resolver.rb +1 -1
- data/lib/kuber_kit/extensions/tty_prompt.rb +30 -0
- data/lib/kuber_kit/shell/commands/helm_commands.rb +7 -2
- data/lib/kuber_kit/version.rb +1 -1
- data/lib/kuber_kit.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8081ab83d65fd9ffa5643c6efef6aa0506d0bfd552579ef57b626964a131e58
|
4
|
+
data.tar.gz: 28fc2827803a3d66c054d58110c018c5d470daba0b91f83c1d5478cef8464140
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1c55d105f40699d48a50e98e94392a0e75d10bcc6fb531a528efadc7c3c952c158d4764c3db8ae22548ca41cf4ac8ef0f67a0d45e6de192d7b9de410fd23c8d
|
7
|
+
data.tar.gz: 4556c79cd2c2e568e366db6f69d3712b2dbdff5e0c1ca5e8408d4e2cafa2a1d1230cf419de7bc9d3fa5a2e0eb2ba782af43bd07a263769a71a169d1531871837
|
data/.github/workflows/rspec.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
**1.3.8**
|
2
|
+
- Deploy initializers separately first even if they are part of the initially requested list of services
|
3
|
+
|
4
|
+
**1.3.7**
|
5
|
+
- Monkeypatch for TTY::Prompt so that we can sanitize the filter value
|
6
|
+
- Add ruby 3.3 support in specs
|
7
|
+
- Update helm deploy command to wait for service restart
|
8
|
+
|
1
9
|
**1.3.6**
|
2
10
|
- Remove dependency on ed25519 gem since it makes installation too complex
|
3
11
|
|
data/README.md
CHANGED
@@ -19,8 +19,8 @@ Please install specific kuber_kit version, depending on Ruby version.
|
|
19
19
|
| Ruby Version | KuberKit Version |
|
20
20
|
| ------------ | ------------ |
|
21
21
|
| 2.6 | 1.0.1 |
|
22
|
-
| 2.7 | 1.1.
|
23
|
-
| > 3.0 | 1.3.
|
22
|
+
| 2.7 | 1.1.8 |
|
23
|
+
| > 3.0 | 1.3.6 |
|
24
24
|
|
25
25
|
## Usage
|
26
26
|
|
@@ -89,9 +89,10 @@ class KuberKit::Actions::ServiceDeployer
|
|
89
89
|
initializers.map(&:to_sym).each_slice(configs.deploy_simultaneous_limit) do |batch_service_names|
|
90
90
|
deploy_simultaneously(batch_service_names, deployment_result)
|
91
91
|
end
|
92
|
+
service_names -= initializers
|
92
93
|
end
|
93
94
|
|
94
|
-
# Next, deploy all requested services.
|
95
|
+
# Next, deploy all requested services, except initializers.
|
95
96
|
service_names.each_slice(configs.deploy_simultaneous_limit) do |batch_service_names|
|
96
97
|
deploy_simultaneously(batch_service_names, deployment_result)
|
97
98
|
end
|
@@ -54,7 +54,7 @@ class KuberKit::Core::Dependencies::AbstractDependencyResolver
|
|
54
54
|
Contract Or[Symbol, ArrayOf[Symbol]] => Any
|
55
55
|
def get_all_deps(item_names)
|
56
56
|
deps = Array(item_names).map { |i| get_recursive_deps(i) }.flatten
|
57
|
-
deps.uniq
|
57
|
+
deps.uniq
|
58
58
|
end
|
59
59
|
|
60
60
|
def get_recursive_deps(item_name, dependency_tree: [])
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require "tty-prompt"
|
2
|
+
|
3
|
+
# Monkeypatch for TTY::Prompt so that we can sanitize the filter value
|
4
|
+
module TTY
|
5
|
+
class Prompt
|
6
|
+
class List
|
7
|
+
def choices(values = (not_set = true))
|
8
|
+
if not_set
|
9
|
+
if !filterable? || @filter.empty?
|
10
|
+
@choices
|
11
|
+
else
|
12
|
+
filter_value = sanitize_for_filter(@filter.join)
|
13
|
+
@filter_cache[filter_value] ||= @choices.enabled.select do |choice|
|
14
|
+
sanitize_for_filter(choice.name.to_s).include?(filter_value)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
else
|
18
|
+
@filter_cache = {}
|
19
|
+
values.each { |val| @choices << val }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def sanitize_for_filter(value)
|
24
|
+
value
|
25
|
+
.downcase
|
26
|
+
.gsub(/[-_]/, '')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -36,7 +36,12 @@ class KuberKit::Shell::Commands::HelmCommands
|
|
36
36
|
helm_run(shell, "install #{release_name} #{chart_path}", kubeconfig_path: kubeconfig_path, namespace: namespace)
|
37
37
|
end
|
38
38
|
|
39
|
-
def upgrade(shell, release_name, chart_path, kubeconfig_path: nil, namespace: nil)
|
40
|
-
|
39
|
+
def upgrade(shell, release_name, chart_path, kubeconfig_path: nil, namespace: nil, wait: true)
|
40
|
+
command_parts = [
|
41
|
+
"upgrade #{release_name} #{chart_path}",
|
42
|
+
"--install"
|
43
|
+
]
|
44
|
+
command_parts << "--wait" if wait
|
45
|
+
helm_run(shell, command_parts, kubeconfig_path: kubeconfig_path, namespace: namespace)
|
41
46
|
end
|
42
47
|
end
|
data/lib/kuber_kit/version.rb
CHANGED
data/lib/kuber_kit.rb
CHANGED
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.3.
|
4
|
+
version: 1.3.8
|
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: 2024-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contracts
|
@@ -325,6 +325,7 @@ files:
|
|
325
325
|
- lib/kuber_kit/extensions/contracts.rb
|
326
326
|
- lib/kuber_kit/extensions/indocker_compat.rb
|
327
327
|
- lib/kuber_kit/extensions/inspectable.rb
|
328
|
+
- lib/kuber_kit/extensions/tty_prompt.rb
|
328
329
|
- lib/kuber_kit/image_compiler/action_handler.rb
|
329
330
|
- lib/kuber_kit/image_compiler/build_server_pool.rb
|
330
331
|
- lib/kuber_kit/image_compiler/build_server_pool_factory.rb
|