kuber_kit 0.5.4 → 0.5.5
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/Gemfile.lock +3 -3
- data/example/services/env_file.rb +1 -1
- data/example/services/ruby_app.rb +1 -1
- data/lib/kuber_kit/actions/service_deployer.rb +7 -2
- data/lib/kuber_kit/cli.rb +4 -2
- data/lib/kuber_kit/service_deployer/service_list_resolver.rb +2 -2
- data/lib/kuber_kit/version.rb +1 -1
- 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: 87f41f4c189d1bb0420bc1db160dbd53c1b2769541b0ad0e772a9b74f20cd3ed
|
4
|
+
data.tar.gz: d2b92edffabbe62b11801d09bd5f81cfd7a27be52aa0cea04ade796bc311f370
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fcbdb08cf391d2ff480a7490261d7508f6e7d970b09091893fa4f6eb7338661df4f42349031303f16db404b74f3ca1f7fe9ec4f699f1c9052358cb661a2e4f8
|
7
|
+
data.tar.gz: 922e179ff88f29dcb15f64a66a4e6fb43c7ee63b5a44be44a86ba401b64685997af1bf370281be36e332e729347e27e2f8f6d8f8f6a5b648bd3a2f6205c079d6
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
kuber_kit (0.5.
|
4
|
+
kuber_kit (0.5.5)
|
5
5
|
cli-ui
|
6
6
|
contracts-lite
|
7
7
|
dry-auto_inject
|
@@ -12,7 +12,7 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
cli-ui (1.
|
15
|
+
cli-ui (1.5.1)
|
16
16
|
coderay (1.1.3)
|
17
17
|
concurrent-ruby (1.1.8)
|
18
18
|
contracts-lite (0.15.0)
|
@@ -58,7 +58,7 @@ GEM
|
|
58
58
|
thor (1.1.0)
|
59
59
|
tty-color (0.6.0)
|
60
60
|
tty-cursor (0.7.1)
|
61
|
-
tty-prompt (0.23.
|
61
|
+
tty-prompt (0.23.1)
|
62
62
|
pastel (~> 0.8)
|
63
63
|
tty-reader (~> 0.8)
|
64
64
|
tty-reader (0.9.0)
|
@@ -14,21 +14,26 @@ class KuberKit::Actions::ServiceDeployer
|
|
14
14
|
Contract KeywordArgs[
|
15
15
|
services: Maybe[ArrayOf[String]],
|
16
16
|
tags: Maybe[ArrayOf[String]],
|
17
|
+
skip_services: Maybe[ArrayOf[String]],
|
17
18
|
skip_compile: Maybe[Bool],
|
18
19
|
require_confirmation: Maybe[Bool],
|
19
20
|
] => Any
|
20
|
-
def call(services:, tags:, skip_compile: false, require_confirmation: false)
|
21
|
+
def call(services:, tags:, skip_services: nil, skip_compile: false, require_confirmation: false)
|
21
22
|
current_configuration = KuberKit.current_configuration
|
22
23
|
|
23
24
|
if services.empty? && tags.empty?
|
24
25
|
services, tags = show_tags_selection
|
25
26
|
end
|
26
27
|
|
28
|
+
|
29
|
+
disabled_services = current_configuration.disabled_services.map(&:to_s)
|
30
|
+
disabled_services += skip_services if skip_services
|
31
|
+
|
27
32
|
service_names = service_list_resolver.resolve(
|
28
33
|
services: services || [],
|
29
34
|
tags: tags || [],
|
30
35
|
enabled_services: current_configuration.enabled_services.map(&:to_s),
|
31
|
-
disabled_services:
|
36
|
+
disabled_services: disabled_services
|
32
37
|
).map(&:to_sym)
|
33
38
|
|
34
39
|
# Return the list of services with all dependencies.
|
data/lib/kuber_kit/cli.rb
CHANGED
@@ -33,6 +33,7 @@ class KuberKit::CLI < Thor
|
|
33
33
|
desc "deploy -t TAG_NAME", "Deploy CONTEXT_NAME with kubectl"
|
34
34
|
method_option :services, :type => :array, aliases: ["-s"], repeatable: true
|
35
35
|
method_option :tags, :type => :array, aliases: ["-t"], repeatable: true
|
36
|
+
method_option :skip_services, :type => :array, aliases: ["-S"], repeatable: true
|
36
37
|
method_option :skip_compile, :type => :boolean, aliases: ["-B"]
|
37
38
|
method_option :require_confirmation, :type => :boolean, aliases: ["-r"]
|
38
39
|
def deploy
|
@@ -46,6 +47,7 @@ class KuberKit::CLI < Thor
|
|
46
47
|
result = KuberKit::Container['actions.service_deployer'].call(
|
47
48
|
services: (options[:services] || []).flatten.uniq,
|
48
49
|
tags: (options[:tags] || []).flatten.uniq,
|
50
|
+
skip_services: (options[:skip_services] || []).flatten.uniq,
|
49
51
|
skip_compile: options[:skip_compile] || false,
|
50
52
|
require_confirmation: require_confirmation
|
51
53
|
)
|
@@ -59,8 +61,8 @@ class KuberKit::CLI < Thor
|
|
59
61
|
end
|
60
62
|
end
|
61
63
|
|
62
|
-
desc "
|
63
|
-
def
|
64
|
+
desc "envfile ENV_FILE_NAME", "Return content of Env File ENV_FILE_NAME"
|
65
|
+
def envfile(env_file_name)
|
64
66
|
setup(options)
|
65
67
|
|
66
68
|
if KuberKit::Container['actions.configuration_loader'].call(options)
|
@@ -46,9 +46,9 @@ class KuberKit::ServiceDeployer::ServiceListResolver
|
|
46
46
|
|
47
47
|
Contract Array => Array
|
48
48
|
def split_by_inclusion(array)
|
49
|
-
excluded, included = array.partition{|e| e.start_with?('
|
49
|
+
excluded, included = array.partition{|e| e.start_with?('^') }
|
50
50
|
|
51
|
-
excluded.map!{ |item| item.gsub(
|
51
|
+
excluded.map!{ |item| item.gsub(/^\^/, "") }
|
52
52
|
|
53
53
|
[included, excluded]
|
54
54
|
end
|
data/lib/kuber_kit/version.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: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Iskander Khaziev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contracts-lite
|