kuber_kit 0.8.8 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d30438270f3b2b82520081fc47903c6a19fdf916369bb238a387bc99b8fa7ab
4
- data.tar.gz: 661c969777f171ead96170c795f04d4cce93989eec75de7a89bf65f8e4711e62
3
+ metadata.gz: d12070a68a28af618ebe127fd4b5bc6e8091e5eda80d97b02bdc5811250a50a5
4
+ data.tar.gz: 1596fe61bafd254762585d87cfb72081c4149305d2754c80fb11d032f8deaf70
5
5
  SHA512:
6
- metadata.gz: 7db454d99455a028a8a235efb4873ea199f38800e818e868d54dc29626ab2694f73e4264a3ec61aa5a355e1b4aaeebabf17fee92efb9e630407dacb004513ee9
7
- data.tar.gz: 00412d664f4beb3ae004a04b916dc75bb7d7284a1a4c8add1a283f2039953fdcd4e84e219432e6fde1fe3a1111af54eec07cdc9b8671b59f9c501dd1dd12ce9c
6
+ metadata.gz: 5a9ba53c902b8d7b24f84752c2fa71f37e1ed65e017f7a1cb1769590bea8fcbb662e1bd1e1223e44f2edcd3fe9697777054f6beccb777d909a8b704c6f121fc4
7
+ data.tar.gz: 10885940c62eac245e82522cad006f3709e10d53bbc9b1b9e33fb6917664ed77f353030bd2aeab315722aeb66386e7f465691b5f16d19ded2e14e0672249574b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ **0.9.0-0.9.2**
2
+ - Allow skipping confirmation during deployment
3
+ - Added `kit sh` command to create a new shell
4
+ - Use tmp dir as image builds parent dir for remote compilation
5
+
1
6
  **0.8.4-0.8.8**
2
7
  - Added initial services support, to deploy before all other servies
3
8
  - Allow namespace as symbol in kubectl commands
@@ -0,0 +1,18 @@
1
+ class KuberKit::Actions::ShellLauncher
2
+ include KuberKit::Import[
3
+ "shell.local_shell",
4
+ "shell_launcher.action_handler",
5
+ "ui",
6
+ ]
7
+
8
+ Contract nil => Any
9
+ def call()
10
+ action_handler.call(local_shell)
11
+
12
+ true
13
+ rescue KuberKit::Error => e
14
+ ui.print_error("Error", e.message)
15
+
16
+ false
17
+ end
18
+ end
data/lib/kuber_kit/cli.rb CHANGED
@@ -41,6 +41,7 @@ class KuberKit::CLI < Thor
41
41
  method_option :skip_compile, :type => :boolean, aliases: ["-B"]
42
42
  method_option :skip_dependencies, :type => :boolean, aliases: ["-D"]
43
43
  method_option :require_confirmation, :type => :boolean, aliases: ["-r"]
44
+ method_option :skip_confirmation, :type => :boolean, aliases: ["-R"]
44
45
  def deploy
45
46
  setup(options)
46
47
 
@@ -48,6 +49,7 @@ class KuberKit::CLI < Thor
48
49
  require_confirmation = options[:require_confirmation] ||
49
50
  KuberKit.current_configuration.deployer_require_confirmation ||
50
51
  false
52
+ require_confirmation = false if options[:skip_confirmation]
51
53
  started_at = Time.now.to_i
52
54
  action_result = KuberKit::Container['actions.service_deployer'].call(
53
55
  services: (options[:services] || []).flatten.uniq,
@@ -161,6 +163,15 @@ class KuberKit::CLI < Thor
161
163
  end
162
164
  end
163
165
 
166
+ desc "sh", "Create a new shell with KUBECONFIG env variable in place"
167
+ def sh()
168
+ setup(options)
169
+
170
+ if KuberKit::Container['actions.configuration_loader'].call(options.merge(load_inventory: false))
171
+ KuberKit::Container['actions.shell_launcher'].call()
172
+ end
173
+ end
174
+
164
175
  desc "get RESOURCE_NAME", "List pods matching RESOURCE_NAME using kubectl"
165
176
  def get(pod_name = nil)
166
177
  setup(options)
@@ -2,10 +2,10 @@
2
2
 
3
3
  class KuberKit::Configs
4
4
  AVAILABLE_CONFIGS = [
5
- :image_dockerfile_name, :image_build_context_dir, :image_tag, :docker_ignore_list, :image_compile_dir,
5
+ :image_dockerfile_name, :image_build_context_dir, :image_tag, :docker_ignore_list, :image_compile_dir, :remote_image_compile_dir,
6
6
  :kuber_kit_dirname, :kuber_kit_min_version, :images_dirname, :services_dirname, :infra_dirname, :configurations_dirname,
7
7
  :artifact_clone_dir, :service_config_dir, :deployer_strategy, :compile_simultaneous_limit, :deploy_simultaneous_limit,
8
- :additional_images_paths, :deprecation_warnings_disabled, :log_file_path, :env_file_compile_dir
8
+ :additional_images_paths, :deprecation_warnings_disabled, :log_file_path, :env_file_compile_dir, :shell_launcher_strategy
9
9
  ]
10
10
  DOCKER_IGNORE_LIST = [
11
11
  'Dockerfile',
@@ -34,12 +34,14 @@ class KuberKit::Configs
34
34
  end
35
35
 
36
36
  def add_default_configs
37
- home_kuber_kit_path = File.expand_path(File.join("~", ".kuber_kit"))
37
+ home_kuber_kit_path = File.join("~", ".kuber_kit")
38
+ absolute_kuber_kit_path = File.expand_path(home_kuber_kit_path)
38
39
 
39
40
  set :image_dockerfile_name, "Dockerfile"
40
41
  set :image_build_context_dir, "build_context"
41
42
  set :image_tag, 'latest'
42
- set :image_compile_dir, File.join(home_kuber_kit_path, "image_builds")
43
+ set :image_compile_dir, File.join(absolute_kuber_kit_path, "image_builds")
44
+ set :remote_image_compile_dir, File.join("tmp", "kuber_kit", "image_builds")
43
45
  set :docker_ignore_list, DOCKER_IGNORE_LIST
44
46
  set :kuber_kit_dirname, "kuber_kit"
45
47
  set :kuber_kit_min_version, KuberKit::VERSION
@@ -47,15 +49,16 @@ class KuberKit::Configs
47
49
  set :services_dirname, "services"
48
50
  set :infra_dirname, "infrastructure"
49
51
  set :configurations_dirname, "configurations"
50
- set :artifact_clone_dir, File.join(home_kuber_kit_path, "artifacts")
51
- set :service_config_dir, File.join(home_kuber_kit_path, "services")
52
+ set :artifact_clone_dir, File.join(absolute_kuber_kit_path, "artifacts")
53
+ set :service_config_dir, File.join(absolute_kuber_kit_path, "services")
52
54
  set :deployer_strategy, :kubernetes
55
+ set :shell_launcher_strategy, :kubernetes
53
56
  set :compile_simultaneous_limit, 5
54
57
  set :deploy_simultaneous_limit, 5
55
58
  set :additional_images_paths, []
56
59
  set :deprecation_warnings_disabled, false
57
- set :log_file_path, File.join(home_kuber_kit_path, "deploy.log")
58
- set :env_file_compile_dir, File.join(home_kuber_kit_path, "env_files")
60
+ set :log_file_path, File.join(absolute_kuber_kit_path, "deploy.log")
61
+ set :env_file_compile_dir, File.join(absolute_kuber_kit_path, "env_files")
59
62
  end
60
63
 
61
64
  def items
@@ -57,6 +57,10 @@ class KuberKit::Container
57
57
  KuberKit::Actions::KubectlEnv.new
58
58
  end
59
59
 
60
+ register "actions.shell_launcher" do
61
+ KuberKit::Actions::ShellLauncher.new
62
+ end
63
+
60
64
  register "configs" do
61
65
  KuberKit::Configs.new
62
66
  end
@@ -293,18 +297,6 @@ class KuberKit::Container
293
297
  KuberKit::ServiceDeployer::ServiceDependencyResolver.new
294
298
  end
295
299
 
296
- register "service_deployer.strategies.kubernetes" do
297
- KuberKit::ServiceDeployer::Strategies::Kubernetes.new
298
- end
299
-
300
- register "service_deployer.strategies.docker" do
301
- KuberKit::ServiceDeployer::Strategies::Docker.new
302
- end
303
-
304
- register "service_deployer.strategies.docker_compose" do
305
- KuberKit::ServiceDeployer::Strategies::DockerCompose.new
306
- end
307
-
308
300
  register "service_reader.action_handler" do
309
301
  KuberKit::ServiceReader::ActionHandler.new
310
302
  end
@@ -313,6 +305,14 @@ class KuberKit::Container
313
305
  KuberKit::ServiceReader::Reader.new
314
306
  end
315
307
 
308
+ register "shell_launcher.action_handler" do
309
+ KuberKit::ShellLauncher::ActionHandler.new
310
+ end
311
+
312
+ register "shell_launcher.launcher" do
313
+ KuberKit::ShellLauncher::Launcher.new
314
+ end
315
+
316
316
  register "kubernetes.resource_selector" do
317
317
  KuberKit::Kubernetes::ResourceSelector.new
318
318
  end
@@ -2,7 +2,8 @@ class KuberKit::Core::Configuration
2
2
  attr_reader :name, :artifacts, :registries, :env_files, :templates, :kubeconfig_path, :kubectl_entrypoint,
3
3
  :services_attributes, :enabled_services, :disabled_services, :default_services,
4
4
  :initial_services, :build_servers, :global_build_vars,
5
- :deployer_strategy, :deployer_namespace, :deployer_require_confirmation
5
+ :deployer_strategy, :deployer_namespace, :deployer_require_confirmation,
6
+ :shell_launcher_strategy
6
7
 
7
8
  Contract KeywordArgs[
8
9
  name: Symbol,
@@ -21,12 +22,13 @@ class KuberKit::Core::Configuration
21
22
  global_build_vars: HashOf[Symbol => Any],
22
23
  deployer_strategy: Symbol,
23
24
  deployer_namespace: Maybe[Or[Symbol, String]],
24
- deployer_require_confirmation: Bool,
25
+ deployer_require_confirmation: Bool,
26
+ shell_launcher_strategy: Symbol,
25
27
  ] => Any
26
28
  def initialize(name:, artifacts:, registries:, env_files:, templates:, kubeconfig_path:, kubectl_entrypoint:,
27
29
  services_attributes:, enabled_services:, disabled_services:, default_services:,
28
30
  initial_services:, build_servers:, global_build_vars:,
29
- deployer_strategy:, deployer_namespace:, deployer_require_confirmation:)
31
+ deployer_strategy:, deployer_namespace:, deployer_require_confirmation:, shell_launcher_strategy:)
30
32
  @name = name
31
33
  @artifacts = artifacts
32
34
  @registries = registries
@@ -43,7 +45,8 @@ class KuberKit::Core::Configuration
43
45
  @global_build_vars = global_build_vars
44
46
  @deployer_strategy = deployer_strategy
45
47
  @deployer_namespace = deployer_namespace
46
- @deployer_require_confirmation = deployer_require_confirmation
48
+ @deployer_require_confirmation = deployer_require_confirmation
49
+ @shell_launcher_strategy = shell_launcher_strategy
47
50
  end
48
51
 
49
52
  def service_attributes(service_name)
@@ -36,7 +36,8 @@ class KuberKit::Core::ConfigurationDefinition
36
36
  global_build_vars: @global_build_vars,
37
37
  deployer_strategy: @deployer_strategy,
38
38
  deployer_namespace: @deployer_namespace,
39
- deployer_require_confirmation: @deployer_require_confirmation || false,
39
+ deployer_require_confirmation: @deployer_require_confirmation || false,
40
+ shell_launcher_strategy: @shell_launcher_strategy,
40
41
  )
41
42
  end
42
43
 
@@ -102,8 +103,8 @@ class KuberKit::Core::ConfigurationDefinition
102
103
  self
103
104
  end
104
105
 
105
- def deployer_strategy(path)
106
- @deployer_strategy = path
106
+ def deployer_strategy(strategy)
107
+ @deployer_strategy = strategy
107
108
 
108
109
  self
109
110
  end
@@ -115,6 +116,12 @@ class KuberKit::Core::ConfigurationDefinition
115
116
  end
116
117
  alias_method :deployer_require_confirimation, :deployer_require_confirmation
117
118
 
119
+ def shell_launcher_strategy(strategy)
120
+ @shell_launcher_strategy = path
121
+
122
+ self
123
+ end
124
+
118
125
  def enabled_services(services)
119
126
  if services.is_a?(Hash)
120
127
  @enabled_services += services.keys.map(&:to_sym)
@@ -36,7 +36,8 @@ class KuberKit::Core::ConfigurationFactory
36
36
  global_build_vars: configuration_attrs.global_build_vars || {},
37
37
  deployer_strategy: configuration_attrs.deployer_strategy || configs.deployer_strategy,
38
38
  deployer_namespace: configuration_attrs.deployer_namespace,
39
- deployer_require_confirmation: configuration_attrs.deployer_require_confirmation,
39
+ deployer_require_confirmation: configuration_attrs.deployer_require_confirmation,
40
+ shell_launcher_strategy: configuration_attrs.shell_launcher_strategy || configs.shell_launcher_strategy,
40
41
  )
41
42
  end
42
43
 
@@ -1,5 +1,5 @@
1
1
  class KuberKit::Core::Service
2
- AttributeNotSet = Class.new(Indocker::Error)
2
+ AttributeNotSet = Class.new(KuberKit::Error)
3
3
 
4
4
  attr_reader :name, :dependencies, :template_name, :tags, :images, :attributes, :deployer_strategy
5
5
 
@@ -7,26 +7,48 @@ class KuberKit::Defaults
7
7
  end
8
8
 
9
9
  def init!
10
- KuberKit::Container["artifacts_sync.artifact_updater"].use_resolver(
11
- KuberKit::Container["artifacts_sync.git_artifact_resolver"],
10
+ container["artifacts_sync.artifact_updater"].use_resolver(
11
+ container["artifacts_sync.git_artifact_resolver"],
12
12
  artifact_class: KuberKit::Core::Artifacts::Git
13
13
  )
14
- KuberKit::Container["artifacts_sync.artifact_updater"].use_resolver(
15
- KuberKit::Container["artifacts_sync.null_artifact_resolver"],
14
+ container["artifacts_sync.artifact_updater"].use_resolver(
15
+ container["artifacts_sync.null_artifact_resolver"],
16
16
  artifact_class: KuberKit::Core::Artifacts::Local
17
17
  )
18
- KuberKit::Container["env_file_reader.reader"].use_reader(
19
- KuberKit::Container["env_file_reader.strategies.artifact_file"],
18
+ container["env_file_reader.reader"].use_reader(
19
+ container["env_file_reader.strategies.artifact_file"],
20
20
  env_file_class: KuberKit::Core::EnvFiles::ArtifactFile
21
21
  )
22
- KuberKit::Container["env_file_reader.reader"].use_reader(
23
- KuberKit::Container["env_file_reader.strategies.env_group"],
22
+ container["env_file_reader.reader"].use_reader(
23
+ container["env_file_reader.strategies.env_group"],
24
24
  env_file_class: KuberKit::Core::EnvFiles::EnvGroup
25
25
  )
26
- KuberKit::Container["template_reader.reader"].use_reader(
27
- KuberKit::Container["template_reader.strategies.artifact_file"],
26
+ container["template_reader.reader"].use_reader(
27
+ container["template_reader.strategies.artifact_file"],
28
28
  template_class: KuberKit::Core::Templates::ArtifactFile
29
29
  )
30
+ container["service_deployer.deployer"].register_strategy(
31
+ :kubernetes,
32
+ KuberKit::ServiceDeployer::Strategies::Kubernetes.new
33
+ )
34
+ container["service_deployer.deployer"].register_strategy(
35
+ :docker,
36
+ KuberKit::ServiceDeployer::Strategies::Docker.new
37
+ )
38
+ container["service_deployer.deployer"].register_strategy(
39
+ :docker_compose,
40
+ KuberKit::ServiceDeployer::Strategies::DockerCompose.new
41
+ )
42
+
43
+ container["shell_launcher.launcher"].register_strategy(
44
+ :kubernetes,
45
+ KuberKit::ShellLauncher::Strategies::Kubernetes.new
46
+ )
30
47
  end
48
+
49
+ private
50
+ def container
51
+ KuberKit::Container
52
+ end
31
53
  end
32
54
  end
@@ -8,17 +8,27 @@ class KuberKit::ImageCompiler::ActionHandler
8
8
 
9
9
  Contract KuberKit::Shell::AbstractShell, Symbol, String => Any
10
10
  def call(shell, image_name, build_id)
11
+ parent_dir = get_image_compile_parent_dir_for_shell(shell)
12
+
11
13
  image = image_store.get_image(image_name)
12
14
 
13
- build_dir_cleaner.call(parent_dir: configs.image_compile_dir)
15
+ build_dir_cleaner.call(parent_dir: parent_dir)
14
16
 
15
- compile_dir = generate_compile_dir(build_id: build_id)
17
+ compile_dir = generate_compile_dir(parent_dir: parent_dir, build_id: build_id)
16
18
 
17
19
  compiler.compile(shell, image, compile_dir)
18
20
  end
19
21
 
20
22
  private
21
- def generate_compile_dir(build_id:)
22
- File.join(configs.image_compile_dir, build_id)
23
+ def generate_compile_dir(parent_dir:, build_id:)
24
+ File.join(parent_dir, build_id)
25
+ end
26
+
27
+ def get_image_compile_parent_dir_for_shell(shell)
28
+ if shell.is_a?(KuberKit::Shell::LocalShell)
29
+ configs.image_compile_dir
30
+ else
31
+ configs.remote_image_compile_dir
32
+ end
23
33
  end
24
34
  end
@@ -3,16 +3,8 @@ class KuberKit::ServiceDeployer::Deployer
3
3
 
4
4
  include KuberKit::Import[
5
5
  "core.service_store",
6
- "service_deployer.strategies.kubernetes",
7
- "service_deployer.strategies.docker",
8
- "service_deployer.strategies.docker_compose"
9
6
  ]
10
7
 
11
- def initialize(**injected_deps, &block)
12
- super(**injected_deps)
13
- add_default_strategies
14
- end
15
-
16
8
  def register_strategy(strategy_name, strategy)
17
9
  @@strategies ||= {}
18
10
 
@@ -31,15 +23,4 @@ class KuberKit::ServiceDeployer::Deployer
31
23
 
32
24
  deployer.deploy(shell, service)
33
25
  end
34
-
35
- def reset!
36
- @@strategies = {}
37
- end
38
-
39
- private
40
- def add_default_strategies
41
- register_strategy(:kubernetes, kubernetes)
42
- register_strategy(:docker, docker)
43
- register_strategy(:docker_compose, docker_compose)
44
- end
45
26
  end
@@ -10,6 +10,10 @@ class KuberKit::Shell::AbstractShell
10
10
  raise KuberKit::NotImplementedError, "must be implemented"
11
11
  end
12
12
 
13
+ def replace!(shell_name: nil, env: [])
14
+ raise KuberKit::NotImplementedError, "must be implemented"
15
+ end
16
+
13
17
  def read(file_path)
14
18
  raise KuberKit::NotImplementedError, "must be implemented"
15
19
  end
@@ -130,4 +130,10 @@ class KuberKit::Shell::Commands::KubectlCommands
130
130
 
131
131
  kubectl_run(shell, command_parts, kubeconfig_path: kubeconfig_path, namespace: namespace)
132
132
  end
133
+
134
+ def set_namespace(shell, namespace, kubeconfig_path: nil)
135
+ command = %Q{config set-context --current --namespace=#{namespace}}
136
+
137
+ kubectl_run(shell, command, kubeconfig_path: kubeconfig_path)
138
+ end
133
139
  end
@@ -58,6 +58,17 @@ class KuberKit::Shell::LocalShell < KuberKit::Shell::AbstractShell
58
58
  end
59
59
  end
60
60
 
61
+ def replace!(shell_name: nil, env: [], log_command: true)
62
+ shell_name ||= "$SHELL"
63
+ command = (env + [shell_name]).join(" ")
64
+
65
+ if log_command
66
+ ui.print_debug("LocalShell", "Replace Shell: #{command.to_s.cyan}")
67
+ end
68
+
69
+ system_exec(command)
70
+ end
71
+
61
72
  def sync(local_path, remote_path, exclude: nil, delete: true)
62
73
  rsync_commands.rsync(self, local_path, remote_path, exclude: exclude, delete: delete)
63
74
  end
@@ -117,6 +128,10 @@ class KuberKit::Shell::LocalShell < KuberKit::Shell::AbstractShell
117
128
  end
118
129
 
119
130
  private
131
+ def system_exec(command)
132
+ exec(command)
133
+ end
134
+
120
135
  def ensure_directory_exists(file_path)
121
136
  dir_path = File.dirname(file_path)
122
137
 
@@ -42,6 +42,10 @@ class KuberKit::Shell::SshShell < KuberKit::Shell::LocalShell
42
42
  raise "Currently interactive run is not supported for ssh shell."
43
43
  end
44
44
 
45
+ def replace!(shell_name: nil, env: [])
46
+ raise "Currently repliace run is not supported for ssh shell."
47
+ end
48
+
45
49
  def sync(local_path, remote_path, exclude: nil, delete: true)
46
50
  rsync_commands.rsync(
47
51
  local_shell, local_path, remote_path,
@@ -0,0 +1,12 @@
1
+ class KuberKit::ShellLauncher::ActionHandler
2
+ include KuberKit::Import[
3
+ "shell_launcher.launcher",
4
+ ]
5
+
6
+ Contract KuberKit::Shell::AbstractShell => Any
7
+ def call(shell)
8
+ strategy_name = KuberKit.current_configuration.shell_launcher_strategy
9
+
10
+ launcher.call(shell, strategy_name)
11
+ end
12
+ end
@@ -0,0 +1,31 @@
1
+ class KuberKit::ShellLauncher::Launcher
2
+ StrategyNotFoundError = Class.new(KuberKit::NotFoundError)
3
+
4
+ include KuberKit::Import[
5
+ "core.service_store",
6
+ ]
7
+
8
+ Contract KuberKit::Shell::AbstractShell, Symbol => Any
9
+ def call(shell, strategy_name)
10
+ launcher = get_strategy(strategy_name)
11
+
12
+ raise StrategyNotFoundError, "Can't find strategy with name #{strategy_name}" if launcher.nil?
13
+
14
+ launcher.call(shell)
15
+ end
16
+
17
+ def register_strategy(strategy_name, strategy)
18
+ @@strategies ||= {}
19
+
20
+ if !strategy.is_a?(KuberKit::ShellLauncher::Strategies::Abstract)
21
+ raise ArgumentError.new("should be an instance of KuberKit::ShellLauncher::Strategies::Abstract, got: #{strategy.inspect}")
22
+ end
23
+
24
+ @@strategies[strategy_name] = strategy
25
+ end
26
+
27
+ def get_strategy(strategy_name)
28
+ @@strategies ||= {}
29
+ @@strategies[strategy_name]
30
+ end
31
+ end
@@ -0,0 +1,5 @@
1
+ class KuberKit::ShellLauncher::Strategies::Abstract
2
+ def call(shell, service)
3
+ raise KuberKit::NotImplementedError, "must be implemented"
4
+ end
5
+ end
@@ -0,0 +1,22 @@
1
+ class KuberKit::ShellLauncher::Strategies::Kubernetes < KuberKit::ShellLauncher::Strategies::Abstract
2
+ include KuberKit::Import[
3
+ "service_reader.reader",
4
+ "shell.kubectl_commands",
5
+ "configs",
6
+ ]
7
+
8
+ Contract KuberKit::Shell::AbstractShell => Any
9
+ def call(shell)
10
+ kubeconfig_path = KuberKit.current_configuration.kubeconfig_path
11
+ if kubeconfig_path.is_a?(KuberKit::Core::ArtifactPath)
12
+ kubeconfig_path = artifact_path_resolver.call(kubeconfig_path)
13
+ end
14
+
15
+ deployer_namespace = KuberKit.current_configuration.deployer_namespace
16
+ if deployer_namespace
17
+ kubectl_commands.set_namespace(shell, deployer_namespace, kubeconfig_path: kubeconfig_path)
18
+ end
19
+
20
+ shell.replace!(env: ["KUBECONFIG=#{kubeconfig_path}"])
21
+ end
22
+ end
@@ -1,3 +1,3 @@
1
1
  module KuberKit
2
- VERSION = "0.8.8"
2
+ VERSION = "0.9.2"
3
3
  end
data/lib/kuber_kit.rb CHANGED
@@ -174,6 +174,16 @@ module KuberKit
174
174
  autoload :Reader, 'service_reader/reader'
175
175
  end
176
176
 
177
+ module ShellLauncher
178
+ autoload :ActionHandler, 'shell_launcher/action_handler'
179
+ autoload :Launcher, 'shell_launcher/launcher'
180
+
181
+ module Strategies
182
+ autoload :Abstract, 'shell_launcher/strategies/abstract'
183
+ autoload :Kubernetes, 'shell_launcher/strategies/kubernetes'
184
+ end
185
+ end
186
+
177
187
  module Actions
178
188
  autoload :ActionResult, 'actions/action_result'
179
189
  autoload :ImageCompiler, 'actions/image_compiler'
@@ -190,6 +200,7 @@ module KuberKit
190
200
  autoload :KubectlGet, 'actions/kubectl_get'
191
201
  autoload :KubectlLogs, 'actions/kubectl_logs'
192
202
  autoload :KubectlEnv, 'actions/kubectl_env'
203
+ autoload :ShellLauncher, 'actions/shell_launcher'
193
204
  end
194
205
 
195
206
  module Extensions
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.8.8
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Khaziev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-11 00:00:00.000000000 Z
11
+ date: 2022-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contracts
@@ -247,6 +247,7 @@ files:
247
247
  - lib/kuber_kit/actions/service_checker.rb
248
248
  - lib/kuber_kit/actions/service_deployer.rb
249
249
  - lib/kuber_kit/actions/service_reader.rb
250
+ - lib/kuber_kit/actions/shell_launcher.rb
250
251
  - lib/kuber_kit/actions/template_reader.rb
251
252
  - lib/kuber_kit/artifacts_sync/abstract_artifact_resolver.rb
252
253
  - lib/kuber_kit/artifacts_sync/artifact_updater.rb
@@ -344,6 +345,10 @@ files:
344
345
  - lib/kuber_kit/shell/local_shell.rb
345
346
  - lib/kuber_kit/shell/ssh_session.rb
346
347
  - lib/kuber_kit/shell/ssh_shell.rb
348
+ - lib/kuber_kit/shell_launcher/action_handler.rb
349
+ - lib/kuber_kit/shell_launcher/launcher.rb
350
+ - lib/kuber_kit/shell_launcher/strategies/abstract.rb
351
+ - lib/kuber_kit/shell_launcher/strategies/kubernetes.rb
347
352
  - lib/kuber_kit/template_reader/action_handler.rb
348
353
  - lib/kuber_kit/template_reader/reader.rb
349
354
  - lib/kuber_kit/template_reader/strategies/abstract.rb