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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/kuber_kit.rb +8 -0
- data/lib/kuber_kit/cli.rb +4 -4
- data/lib/kuber_kit/service_deployer/strategies/docker.rb +4 -0
- data/lib/kuber_kit/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5c1697ed582055ca1d233797dcc663ffd8c2e7a00763b7d8a9ea8ca639b2270
|
4
|
+
data.tar.gz: a707b96dc99201d2d3c2338ceaef7d53d5241772f718b2453cb6249ce82b2335
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be389af37cb52dd30f7a7cd6795231d3e7894fea24d303c1bdcb47f84b74e4e8b558a20e04e611a2263ae2d44cb008edd5e77beba4011d137fb5df06dd63b909
|
7
|
+
data.tar.gz: ee6144b4aad93cfa417d3cad69bfb1cc14b11fea014a50d02bfa2996306fa4b32de7923b9d8105ca79d7793ffac5dc123bb5bb7f2d4562e97405dafab3399956
|
data/Gemfile.lock
CHANGED
data/lib/kuber_kit.rb
CHANGED
@@ -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
|
data/lib/kuber_kit/cli.rb
CHANGED
@@ -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}"
|
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.4.
|
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-
|
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.
|
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: []
|