kuber_kit 1.2.2 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/kuber_kit/actions/configuration_loader.rb +6 -0
- data/lib/kuber_kit/actions/kubectl_attacher.rb +7 -4
- data/lib/kuber_kit/actions/kubectl_logs.rb +7 -4
- data/lib/kuber_kit/cli.rb +1 -0
- data/lib/kuber_kit/shell_launcher/strategies/kubernetes.rb +1 -1
- data/lib/kuber_kit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ff76b8cf852a2ab0155ebd06f03d6e7fe49a984f296434acab9de8d02953eff
|
4
|
+
data.tar.gz: a5e9665951d91594fef05494b2a11ee5c216dc301591849334da72f959f68d4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7678e2dced05a8ab9b95c847e3e88ffa6c0a3f1eb97e9aab129e5f54bf376d900c88ad5b825989204fa36f201f169d94858d13711203882e6299c37e8dfc676d
|
7
|
+
data.tar.gz: 2658ad03f603621a9becb59b7dc07e7b5bfbc6cb54f0c8bf6a9dec54ce44447c50c8488c497f8904b29373b8bf5e684bcfda667ce0e761b899c190f5e04b47ab
|
data/CHANGELOG.md
CHANGED
@@ -20,6 +20,7 @@ class KuberKit::Actions::ConfigurationLoader
|
|
20
20
|
configurations_path = options[:configurations_path] || File.join(root_path, configs.configurations_dirname)
|
21
21
|
configuration_name = options[:configuration] || ENV["KUBER_KIT_CONFIGURATION"]
|
22
22
|
load_inventory = options.fetch(:load_inventory, true)
|
23
|
+
use_local_deploy = options.fetch(:use_local_deploy, false)
|
23
24
|
|
24
25
|
ui.print_debug "ConfigurationLoader", "Launching kuber_kit with:"
|
25
26
|
ui.print_debug "ConfigurationLoader", " Root path: #{root_path.to_s.yellow}"
|
@@ -28,6 +29,7 @@ class KuberKit::Actions::ConfigurationLoader
|
|
28
29
|
ui.print_debug "ConfigurationLoader", " Infrastructure path: #{infra_path.to_s.yellow}"
|
29
30
|
ui.print_debug "ConfigurationLoader", " Configurations path: #{configurations_path.to_s.yellow}"
|
30
31
|
ui.print_debug "ConfigurationLoader", " Configuration name: #{configuration_name.to_s.yellow}"
|
32
|
+
ui.print_debug "ConfigurationLoader", " Use local deploy: #{use_local_deploy.to_s.yellow}"
|
31
33
|
|
32
34
|
ui.print_info("Logs", "See logs at: #{configs.log_file_path}")
|
33
35
|
|
@@ -39,6 +41,10 @@ class KuberKit::Actions::ConfigurationLoader
|
|
39
41
|
raise KuberKit::Error, "The minimal required kuber_kit version is #{configs.kuber_kit_min_version}"
|
40
42
|
end
|
41
43
|
|
44
|
+
if use_local_deploy
|
45
|
+
ENV["KUBER_KIT_USE_LOCAL_DEPLOYMENT"] = "true"
|
46
|
+
end
|
47
|
+
|
42
48
|
load_configurations(configurations_path, configuration_name)
|
43
49
|
load_infrastructure(infra_path)
|
44
50
|
|
@@ -7,17 +7,20 @@ class KuberKit::Actions::KubectlAttacher
|
|
7
7
|
]
|
8
8
|
|
9
9
|
Contract Maybe[String], Hash => Any
|
10
|
-
def call(
|
10
|
+
def call(resource_name, options)
|
11
11
|
kubeconfig_path = KuberKit.current_configuration.kubeconfig_path
|
12
12
|
kubectl_entrypoint = KuberKit.current_configuration.kubectl_entrypoint
|
13
13
|
deployer_namespace = KuberKit.current_configuration.deployer_namespace
|
14
14
|
|
15
|
-
if !
|
16
|
-
|
15
|
+
if !resource_name
|
16
|
+
resource_name = resource_selector.call("attach", additional_resources: [
|
17
|
+
KuberKit::Kubernetes::Resources::POD,
|
18
|
+
KuberKit::Kubernetes::Resources::JOB
|
19
|
+
])
|
17
20
|
end
|
18
21
|
|
19
22
|
kubectl_commands.exec(
|
20
|
-
local_shell,
|
23
|
+
local_shell, resource_name, "bash", args: "-it",
|
21
24
|
kubeconfig_path: kubeconfig_path,
|
22
25
|
interactive: true,
|
23
26
|
namespace: deployer_namespace,
|
@@ -7,12 +7,15 @@ class KuberKit::Actions::KubectlLogs
|
|
7
7
|
]
|
8
8
|
|
9
9
|
Contract Maybe[String], Hash => Any
|
10
|
-
def call(
|
10
|
+
def call(resource_name, options)
|
11
11
|
kubeconfig_path = KuberKit.current_configuration.kubeconfig_path
|
12
12
|
deployer_namespace = KuberKit.current_configuration.deployer_namespace
|
13
13
|
|
14
|
-
if !
|
15
|
-
|
14
|
+
if !resource_name
|
15
|
+
resource_name = resource_selector.call("attach", additional_resources: [
|
16
|
+
KuberKit::Kubernetes::Resources::POD,
|
17
|
+
KuberKit::Kubernetes::Resources::JOB
|
18
|
+
])
|
16
19
|
end
|
17
20
|
|
18
21
|
args = nil
|
@@ -21,7 +24,7 @@ class KuberKit::Actions::KubectlLogs
|
|
21
24
|
end
|
22
25
|
|
23
26
|
kubectl_commands.logs(
|
24
|
-
local_shell,
|
27
|
+
local_shell, resource_name,
|
25
28
|
args: args,
|
26
29
|
kubeconfig_path: kubeconfig_path,
|
27
30
|
namespace: deployer_namespace
|
data/lib/kuber_kit/cli.rb
CHANGED
@@ -11,6 +11,7 @@ class KuberKit::CLI < Thor
|
|
11
11
|
class_option :debug, :type => :boolean, aliases: ["-d"]
|
12
12
|
class_option :configuration, :type => :string, aliases: ["-C"]
|
13
13
|
class_option :user, :type => :string, aliases: ["-u"]
|
14
|
+
class_option :use_local_deploy, :type => :boolean, aliases: ["-l"]
|
14
15
|
|
15
16
|
desc "compile IMAGE_NAMES", "Compile image with IMAGE_NAMES (comma-separated)"
|
16
17
|
def compile(image_names_str)
|
@@ -26,6 +26,6 @@ class KuberKit::ShellLauncher::Strategies::Kubernetes < KuberKit::ShellLauncher:
|
|
26
26
|
env_vars << "KUBER_KIT_CONFIGURATION=#{KuberKit.current_configuration.name}"
|
27
27
|
end
|
28
28
|
|
29
|
-
shell.replace!(env:
|
29
|
+
shell.replace!(env: env_vars)
|
30
30
|
end
|
31
31
|
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: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Iskander Khaziev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contracts
|
@@ -397,7 +397,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
397
397
|
- !ruby/object:Gem::Version
|
398
398
|
version: '0'
|
399
399
|
requirements: []
|
400
|
-
rubygems_version: 3.
|
400
|
+
rubygems_version: 3.4.1
|
401
401
|
signing_key:
|
402
402
|
specification_version: 4
|
403
403
|
summary: Docker Containers Build & Deployment
|