kuberun 0.3.0 → 0.3.2
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 +8 -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: 7508a69c4b462a86dd673e355d57ef5aa17718ce628776d6349e5d2aa6ae0d45
|
4
|
+
data.tar.gz: 83fb7c45b506a5d09f49f9e00fc2ccc40022d906e33252691cc71e2eeb20ddaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cce21ebd7e37b9d9044d1716207077495f3f70ebb27a6cf4e15a352795ff42a4b5c0068d1b2b923140ab6841c0a4b5a16997bc25506c081f483a276984e779c
|
7
|
+
data.tar.gz: b4a286de27d7ee4a609ca2e8deeab8316ed821ccd0c9dd05b426190864f98c88ea94cb04046b0cee0bf33be1ac6a6c361e5e828740a8290a2475f7891df3dbbd
|
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']
|
@@ -30,6 +32,7 @@ module Kuberun
|
|
30
32
|
select = existing_pods['items'].map { |item| item.dig('metadata', 'name') }
|
31
33
|
select << NEW_POD
|
32
34
|
|
35
|
+
output.puts
|
33
36
|
selection = prompt.select('I found some already running pods. Do you want to use one?', select)
|
34
37
|
|
35
38
|
if selection == NEW_POD
|
@@ -49,7 +52,7 @@ module Kuberun
|
|
49
52
|
Kuberun::Pastel.green("Pod #{generated_pod_name} has been deleted!")
|
50
53
|
end
|
51
54
|
|
52
|
-
output.puts
|
55
|
+
output.puts
|
53
56
|
end
|
54
57
|
|
55
58
|
private
|
@@ -65,6 +68,7 @@ module Kuberun
|
|
65
68
|
pod.dig('status', 'phase') == 'Running'
|
66
69
|
end
|
67
70
|
|
71
|
+
output.puts
|
68
72
|
output.puts(Kuberun::Pastel.green('Pod is running!'))
|
69
73
|
end
|
70
74
|
|
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