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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e99c1ae700ec8b59f9a832d3c9131e85c7d05a60548d8bca032d4ce2c9178b2
4
- data.tar.gz: e4233e8cf40a7980477d85f341320536725efd169ac4120e74de6c7ad651e436
3
+ metadata.gz: 87f41f4c189d1bb0420bc1db160dbd53c1b2769541b0ad0e772a9b74f20cd3ed
4
+ data.tar.gz: d2b92edffabbe62b11801d09bd5f81cfd7a27be52aa0cea04ade796bc311f370
5
5
  SHA512:
6
- metadata.gz: 10a3f4b72a0d3a09c9a49842642e6f7a0457a5cb243d0c469c9792c7fcc70ff483b9ffbd6ecc7c278d20b3b7e22f603e45ad3360e701b1a9cf9696cff64d46ce
7
- data.tar.gz: f857ce1a307375486c51cfaa67c22a929826b54a1ad572dc5a5ac64fb4febfe680fa27f3adddadf2d2b3d68325cd5dee7ba47facdf672c427640d048c23c950f
6
+ metadata.gz: 0fcbdb08cf391d2ff480a7490261d7508f6e7d970b09091893fa4f6eb7338661df4f42349031303f16db404b74f3ca1f7fe9ec4f699f1c9052358cb661a2e4f8
7
+ data.tar.gz: 922e179ff88f29dcb15f64a66a4e6fb43c7ee63b5a44be44a86ba401b64685997af1bf370281be36e332e729347e27e2f8f6d8f8f6a5b648bd3a2f6205c079d6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ **0.5.5**
2
+ - Added ability to skip services during deployment using -S option
3
+
1
4
  **0.5.4**
2
5
  - Added disabled services support
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kuber_kit (0.5.4)
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.4.0)
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.0)
61
+ tty-prompt (0.23.1)
62
62
  pastel (~> 0.8)
63
63
  tty-reader (~> 0.8)
64
64
  tty-reader (0.9.0)
@@ -1,7 +1,7 @@
1
1
  KuberKit
2
2
  .define_service(:env_file)
3
3
  .template(:env_file)
4
- .tags("env_file")
4
+ .tags("env_file", "minimal")
5
5
  .attributes(
6
6
  deployer_restart_enabled: false
7
7
  )
@@ -3,4 +3,4 @@ KuberKit
3
3
  .depends_on(:env_file)
4
4
  .template(:service)
5
5
  .images(:ruby_app)
6
- .tags("app")
6
+ .tags("app", "minimal")
@@ -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: current_configuration.disabled_services.map(&:to_s)
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 "env ENV_FILE_NAME", "Return content of Env File ENV_FILE_NAME"
63
- def env(env_file_name)
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
@@ -1,3 +1,3 @@
1
1
  module KuberKit
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
3
3
  end
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
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-03-18 00:00:00.000000000 Z
11
+ date: 2021-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contracts-lite