kuber_kit 0.8.7 → 0.8.8
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/CHANGELOG.md +3 -4
- data/lib/kuber_kit/actions/kubectl_attacher.rb +5 -3
- data/lib/kuber_kit/actions/kubectl_console.rb +5 -3
- data/lib/kuber_kit/core/configuration.rb +4 -2
- data/lib/kuber_kit/core/configuration_definition.rb +7 -0
- data/lib/kuber_kit/core/configuration_factory.rb +1 -0
- data/lib/kuber_kit/shell/commands/kubectl_commands.rb +5 -1
- data/lib/kuber_kit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d30438270f3b2b82520081fc47903c6a19fdf916369bb238a387bc99b8fa7ab
|
4
|
+
data.tar.gz: 661c969777f171ead96170c795f04d4cce93989eec75de7a89bf65f8e4711e62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7db454d99455a028a8a235efb4873ea199f38800e818e868d54dc29626ab2694f73e4264a3ec61aa5a355e1b4aaeebabf17fee92efb9e630407dacb004513ee9
|
7
|
+
data.tar.gz: 00412d664f4beb3ae004a04b916dc75bb7d7284a1a4c8add1a283f2039953fdcd4e84e219432e6fde1fe3a1111af54eec07cdc9b8671b59f9c501dd1dd12ce9c
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
**0.8.
|
2
|
-
- Properly show initial services in deployment confirmation
|
3
|
-
|
4
|
-
**0.8.4**
|
1
|
+
**0.8.4-0.8.8**
|
5
2
|
- Added initial services support, to deploy before all other servies
|
3
|
+
- Allow namespace as symbol in kubectl commands
|
4
|
+
- Allow setting kubectl entrypoint for configuration
|
6
5
|
|
7
6
|
**0.8.3**
|
8
7
|
- Always load artifacts, if kubeconfig is an artifact
|
@@ -8,7 +8,8 @@ class KuberKit::Actions::KubectlAttacher
|
|
8
8
|
|
9
9
|
Contract Maybe[String], Hash => Any
|
10
10
|
def call(pod_name, options)
|
11
|
-
kubeconfig_path
|
11
|
+
kubeconfig_path = KuberKit.current_configuration.kubeconfig_path
|
12
|
+
kubectl_entrypoint = KuberKit.current_configuration.kubectl_entrypoint
|
12
13
|
deployer_namespace = KuberKit.current_configuration.deployer_namespace
|
13
14
|
|
14
15
|
if !pod_name
|
@@ -18,8 +19,9 @@ class KuberKit::Actions::KubectlAttacher
|
|
18
19
|
kubectl_commands.exec(
|
19
20
|
local_shell, pod_name, "bash", args: "-it",
|
20
21
|
kubeconfig_path: kubeconfig_path,
|
21
|
-
interactive:
|
22
|
-
namespace:
|
22
|
+
interactive: true,
|
23
|
+
namespace: deployer_namespace,
|
24
|
+
entrypoint: kubectl_entrypoint
|
23
25
|
)
|
24
26
|
|
25
27
|
true
|
@@ -8,7 +8,8 @@ class KuberKit::Actions::KubectlConsole
|
|
8
8
|
|
9
9
|
Contract Maybe[String], Hash => Any
|
10
10
|
def call(pod_name, options)
|
11
|
-
kubeconfig_path
|
11
|
+
kubeconfig_path = KuberKit.current_configuration.kubeconfig_path
|
12
|
+
kubectl_entrypoint = KuberKit.current_configuration.kubectl_entrypoint
|
12
13
|
deployer_namespace = KuberKit.current_configuration.deployer_namespace
|
13
14
|
|
14
15
|
if !pod_name
|
@@ -18,8 +19,9 @@ class KuberKit::Actions::KubectlConsole
|
|
18
19
|
kubectl_commands.exec(
|
19
20
|
local_shell, pod_name, "bin/console", args: "-it",
|
20
21
|
kubeconfig_path: kubeconfig_path,
|
21
|
-
interactive:
|
22
|
-
namespace:
|
22
|
+
interactive: true,
|
23
|
+
namespace: deployer_namespace,
|
24
|
+
entrypoint: kubectl_entrypoint
|
23
25
|
)
|
24
26
|
|
25
27
|
true
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class KuberKit::Core::Configuration
|
2
|
-
attr_reader :name, :artifacts, :registries, :env_files, :templates, :kubeconfig_path,
|
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
5
|
:deployer_strategy, :deployer_namespace, :deployer_require_confirmation
|
@@ -11,6 +11,7 @@ class KuberKit::Core::Configuration
|
|
11
11
|
env_files: Hash,
|
12
12
|
templates: Hash,
|
13
13
|
kubeconfig_path: Maybe[Or[String, KuberKit::Core::ArtifactPath]],
|
14
|
+
kubectl_entrypoint: Maybe[String],
|
14
15
|
services_attributes: HashOf[Symbol => Hash],
|
15
16
|
enabled_services: ArrayOf[Symbol],
|
16
17
|
disabled_services: ArrayOf[Symbol],
|
@@ -22,7 +23,7 @@ class KuberKit::Core::Configuration
|
|
22
23
|
deployer_namespace: Maybe[Or[Symbol, String]],
|
23
24
|
deployer_require_confirmation: Bool,
|
24
25
|
] => Any
|
25
|
-
def initialize(name:, artifacts:, registries:, env_files:, templates:, kubeconfig_path:,
|
26
|
+
def initialize(name:, artifacts:, registries:, env_files:, templates:, kubeconfig_path:, kubectl_entrypoint:,
|
26
27
|
services_attributes:, enabled_services:, disabled_services:, default_services:,
|
27
28
|
initial_services:, build_servers:, global_build_vars:,
|
28
29
|
deployer_strategy:, deployer_namespace:, deployer_require_confirmation:)
|
@@ -32,6 +33,7 @@ class KuberKit::Core::Configuration
|
|
32
33
|
@env_files = env_files
|
33
34
|
@templates = templates
|
34
35
|
@kubeconfig_path = kubeconfig_path
|
36
|
+
@kubectl_entrypoint = kubectl_entrypoint
|
35
37
|
@build_servers = build_servers
|
36
38
|
@services_attributes = services_attributes
|
37
39
|
@enabled_services = enabled_services
|
@@ -26,6 +26,7 @@ class KuberKit::Core::ConfigurationDefinition
|
|
26
26
|
env_files: @env_files,
|
27
27
|
templates: @templates,
|
28
28
|
kubeconfig_path: @kubeconfig_path,
|
29
|
+
kubectl_entrypoint: @kubectl_entrypoint,
|
29
30
|
enabled_services: @enabled_services,
|
30
31
|
disabled_services: @disabled_services,
|
31
32
|
default_services: @default_services,
|
@@ -89,6 +90,12 @@ class KuberKit::Core::ConfigurationDefinition
|
|
89
90
|
self
|
90
91
|
end
|
91
92
|
|
93
|
+
def kubectl_entrypoint(path)
|
94
|
+
@kubectl_entrypoint = path
|
95
|
+
|
96
|
+
self
|
97
|
+
end
|
98
|
+
|
92
99
|
def deployer_namespace(namespace)
|
93
100
|
@deployer_namespace = namespace
|
94
101
|
|
@@ -26,6 +26,7 @@ class KuberKit::Core::ConfigurationFactory
|
|
26
26
|
env_files: env_files,
|
27
27
|
templates: templates,
|
28
28
|
kubeconfig_path: configuration_attrs.kubeconfig_path,
|
29
|
+
kubectl_entrypoint: configuration_attrs.kubectl_entrypoint,
|
29
30
|
build_servers: build_servers,
|
30
31
|
services_attributes: configuration_attrs.services_attributes,
|
31
32
|
enabled_services: configuration_attrs.enabled_services,
|
@@ -43,13 +43,17 @@ class KuberKit::Shell::Commands::KubectlCommands
|
|
43
43
|
kubectl_run(shell, "apply -f #{file_path}", kubeconfig_path: kubeconfig_path, namespace: namespace)
|
44
44
|
end
|
45
45
|
|
46
|
-
def exec(shell, pod_name, command, args: nil, kubeconfig_path: nil, interactive: false, namespace: nil)
|
46
|
+
def exec(shell, pod_name, command, args: nil, kubeconfig_path: nil, interactive: false, namespace: nil, entrypoint: nil)
|
47
47
|
command_parts = []
|
48
48
|
command_parts << "exec"
|
49
49
|
|
50
50
|
if args
|
51
51
|
command_parts << args
|
52
52
|
end
|
53
|
+
|
54
|
+
if entrypoint
|
55
|
+
command = entrypoint.gsub("$@", command)
|
56
|
+
end
|
53
57
|
|
54
58
|
command_parts << pod_name
|
55
59
|
command_parts << "-- #{command}"
|
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.8.
|
4
|
+
version: 0.8.8
|
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-
|
11
|
+
date: 2022-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contracts
|