kuberun 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/kuberun/commands/run_pod.rb +7 -4
- data/lib/kuberun/kubectl.rb +1 -1
- data/lib/kuberun/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9866a7b293e3bf832f66ee91b61ce7054c0d0dd91219343dae1eee009f87d9f5
|
4
|
+
data.tar.gz: 4bb59f1eebabb62e001541b834c35ba35336da052e3d068f18dd020c7258b618
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 943de6924ab8d02a74fb49efab138a974bd6d510cb92aac6cf951058d04092a89860da0fbfb93a91c0cfb09bec992d6d66dc3f38906a4b2ee38d84fac293a50f
|
7
|
+
data.tar.gz: 1559d02c2ae020f8d8a291086145ed1ef5856940ff7ff02524de6d48639d62a186801778b955e80b17d60d0f038ca04ecc2400f2616a5c2867d97d82f289f84e
|
data/Gemfile.lock
CHANGED
@@ -15,13 +15,15 @@ module Kuberun
|
|
15
15
|
|
16
16
|
def execute(input: $stdin, output: $stdout)
|
17
17
|
if @options['perform-auth-check']
|
18
|
-
output.
|
18
|
+
output.print(Kuberun::Pastel.yellow('Checking access to needed commands'))
|
19
19
|
Kuberun::Kubectl.auth_check('create', resource: 'pods')
|
20
20
|
Kuberun::Kubectl.auth_check('exec', resource: 'pods')
|
21
|
-
|
21
|
+
|
22
|
+
output.puts
|
23
|
+
output.puts(Kuberun::Pastel.green('You have all permissions needed'))
|
22
24
|
end
|
23
25
|
|
24
|
-
output.
|
26
|
+
output.print(Kuberun::Pastel.yellow('Searching for existing pods'))
|
25
27
|
existing_pods = Kuberun::Kubectl.get(resource: 'pods', options: "-l kuberun-provisioned=true,kuberun-source=#{@deployment_name}")
|
26
28
|
if existing_pods['items'].size > 0
|
27
29
|
if @options['use-first-pod']
|
@@ -49,7 +51,7 @@ module Kuberun
|
|
49
51
|
Kuberun::Pastel.green("Pod #{generated_pod_name} has been deleted!")
|
50
52
|
end
|
51
53
|
|
52
|
-
output.puts
|
54
|
+
output.puts
|
53
55
|
end
|
54
56
|
|
55
57
|
private
|
@@ -65,6 +67,7 @@ module Kuberun
|
|
65
67
|
pod.dig('status', 'phase') == 'Running'
|
66
68
|
end
|
67
69
|
|
70
|
+
output.puts
|
68
71
|
output.puts(Kuberun::Pastel.green('Pod is running!'))
|
69
72
|
end
|
70
73
|
|
data/lib/kuberun/kubectl.rb
CHANGED
@@ -26,7 +26,7 @@ class Kubectl
|
|
26
26
|
'use-first-pod': { type: 'boolean', default: false, desc: 'Should first existing pod be used automatically?' },
|
27
27
|
'cleanup-pod': { type: 'boolean', default: false, desc: 'Should pod be removed after finishing?' },
|
28
28
|
'perform-auth-check': { type: 'boolean', default: true, desc: 'Should auth check be performed?' },
|
29
|
-
'pty': { type: 'boolean', default:
|
29
|
+
'pty': { type: 'boolean', default: false, desc: 'Should PTY be used?' },
|
30
30
|
}.freeze
|
31
31
|
OPTIONS = KUBECTL_OPTIONS.merge(SCRIPT_OPTIONS).freeze
|
32
32
|
|
data/lib/kuberun/version.rb
CHANGED