kuber_kit 0.4.3 → 0.4.4

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: f88af58c1a98432ce14e5527ea39dda750b641c80deeddb76b281dc861b1814f
4
- data.tar.gz: 4b60492fae06a45b460d022ae540eb4e442e4aec65194791ba2e7306502612a9
3
+ metadata.gz: c5c1697ed582055ca1d233797dcc663ffd8c2e7a00763b7d8a9ea8ca639b2270
4
+ data.tar.gz: a707b96dc99201d2d3c2338ceaef7d53d5241772f718b2453cb6249ce82b2335
5
5
  SHA512:
6
- metadata.gz: 205b900fc00004c918108da19680c83f433b79d87b727421abdfec8680b7a0aef5ec0ad474605e7aa34e6370c047a8bbe20c1b81c4639684c8c6919a040e2ed4
7
- data.tar.gz: a18edd776b63ffca524819a06adad9031c47272e12f69e66006fc0220e43510cc01f7697d225516c0861dde37523b0293cbe51b004f1336c3ffdbcc0673fca86
6
+ metadata.gz: be389af37cb52dd30f7a7cd6795231d3e7894fea24d303c1bdcb47f84b74e4e8b558a20e04e611a2263ae2d44cb008edd5e77beba4011d137fb5df06dd63b909
7
+ data.tar.gz: ee6144b4aad93cfa417d3cad69bfb1cc14b11fea014a50d02bfa2996306fa4b32de7923b9d8105ca79d7793ffac5dc123bb5bb7f2d4562e97405dafab3399956
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kuber_kit (0.4.3)
4
+ kuber_kit (0.4.4)
5
5
  cli-ui
6
6
  contracts-lite
7
7
  dry-auto_inject
@@ -254,6 +254,14 @@ module KuberKit
254
254
  KuberKit::Core::ContextHelper::BaseHelper.class_exec(&proc)
255
255
  end
256
256
 
257
+ def user
258
+ @user ||= ENV["KUBER_KIT_USERNAME"] || `whoami`.chomp
259
+ end
260
+
261
+ def user_id
262
+ @user_id ||= `id -u #{user}`.chomp
263
+ end
264
+
257
265
  def configure(&proc)
258
266
  yield(Container["configs"])
259
267
  end
@@ -31,8 +31,8 @@ class KuberKit::CLI < Thor
31
31
  end
32
32
 
33
33
  desc "deploy CONTEXT_NAME", "Deploy CONTEXT_NAME with kubectl"
34
- method_option :services, :type => :array, aliases: ["-s"]
35
- method_option :tags, :type => :array, aliases: ["-t"]
34
+ method_option :services, :type => :array, aliases: ["-s"], repeatable: true
35
+ method_option :tags, :type => :array, aliases: ["-t"], repeatable: true
36
36
  method_option :skip_compile, :type => :boolean, aliases: ["-B"]
37
37
  method_option :require_confirmation, :type => :boolean, aliases: ["-r"]
38
38
  def deploy
@@ -44,8 +44,8 @@ class KuberKit::CLI < Thor
44
44
  false
45
45
  started_at = Time.now.to_i
46
46
  result = KuberKit::Container['actions.service_deployer'].call(
47
- services: options[:services] || [],
48
- tags: options[:tags] || [],
47
+ services: (options[:services] || []).flatten.uniq,
48
+ tags: (options[:tags] || []).flatten.uniq,
49
49
  skip_compile: options[:skip_compile] || false,
50
50
  require_confirmation: require_confirmation
51
51
  )
@@ -29,6 +29,7 @@ class KuberKit::ServiceDeployer::Strategies::Docker < KuberKit::ServiceDeployer:
29
29
  custom_args = strategy_options.fetch(:custom_args, nil)
30
30
  networks = strategy_options.fetch(:networks, [])
31
31
  volumes = strategy_options.fetch(:volumes, [])
32
+ hostname = strategy_options.fetch(:hostname, container_name)
32
33
 
33
34
  image_name = strategy_options.fetch(:image_name, nil)
34
35
  if image_name.nil?
@@ -45,6 +46,9 @@ class KuberKit::ServiceDeployer::Strategies::Docker < KuberKit::ServiceDeployer:
45
46
  if container_name
46
47
  custom_args << "--name #{container_name}"
47
48
  end
49
+ if hostname
50
+ custom_args << "--hostname #{hostname}"
51
+ end
48
52
  networks.each do |network|
49
53
  docker_commands.create_network(shell, network)
50
54
  custom_args << "--network #{network}"
@@ -1,3 +1,3 @@
1
1
  module KuberKit
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
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.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Khaziev
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-14 00:00:00.000000000 Z
11
+ date: 2021-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contracts-lite
@@ -297,7 +297,7 @@ homepage: https://github.com/ArtStation/kuber_kit
297
297
  licenses:
298
298
  - MIT
299
299
  metadata: {}
300
- post_install_message:
300
+ post_install_message:
301
301
  rdoc_options: []
302
302
  require_paths:
303
303
  - lib
@@ -312,8 +312,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
312
312
  - !ruby/object:Gem::Version
313
313
  version: '0'
314
314
  requirements: []
315
- rubygems_version: 3.0.8
316
- signing_key:
315
+ rubygems_version: 3.0.9
316
+ signing_key:
317
317
  specification_version: 4
318
318
  summary: Docker Containers Build & Deployment
319
319
  test_files: []