kuberun 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -7
- data/README.md +12 -0
- data/lib/kuberun/commands/run_pod.rb +21 -2
- data/lib/kuberun/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fc3f7913af8d907aa812a4880ff50b1420975907711e5da1bdb821b4ed32f42
|
4
|
+
data.tar.gz: efb39302384d0abee048e960e6498fe4b1d7ce76076f444763afa27c5ad1b22a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '069b9f4e7c380850db8eb00e76e59a273782d78060912954f2730b2819df39ed95954e1b388d5eaf0d2f723837bb834c4cbba47db47216715a218e5c7c07e39c'
|
7
|
+
data.tar.gz: 6ebeba3f0ff78ff81fb9360949497f3d57942a3417a1a96b1dce8d9addd054abc77f72b005df132f1ca99c143c285943790aeb6b548434092141e2adf3202a41
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
kuberun (0.1.
|
4
|
+
kuberun (0.1.4)
|
5
5
|
pastel (~> 0.7.2)
|
6
6
|
thor (~> 0.20.0)
|
7
7
|
tty-color (~> 0.4.2)
|
@@ -28,7 +28,6 @@ GEM
|
|
28
28
|
ast (2.4.0)
|
29
29
|
diff-lcs (1.3)
|
30
30
|
equatable (0.5.0)
|
31
|
-
hitimes (1.3.0)
|
32
31
|
jaro_winkler (1.5.1)
|
33
32
|
kramdown (1.16.2)
|
34
33
|
necromancer (0.4.0)
|
@@ -67,9 +66,8 @@ GEM
|
|
67
66
|
strings (0.1.1)
|
68
67
|
unicode-display_width (~> 1.3.0)
|
69
68
|
unicode_utils (~> 1.4.0)
|
70
|
-
thor (0.20.
|
71
|
-
timers (4.
|
72
|
-
hitimes
|
69
|
+
thor (0.20.3)
|
70
|
+
timers (4.3.2)
|
73
71
|
tty-color (0.4.3)
|
74
72
|
tty-command (0.8.2)
|
75
73
|
pastel (~> 0.7.0)
|
@@ -122,7 +120,7 @@ GEM
|
|
122
120
|
tty-which (0.3.0)
|
123
121
|
unicode-display_width (1.3.0)
|
124
122
|
unicode_utils (1.4.0)
|
125
|
-
wisper (2.0.
|
123
|
+
wisper (2.0.1)
|
126
124
|
|
127
125
|
PLATFORMS
|
128
126
|
ruby
|
@@ -135,4 +133,4 @@ DEPENDENCIES
|
|
135
133
|
rubocop (~> 0.58.0)
|
136
134
|
|
137
135
|
BUNDLED WITH
|
138
|
-
1.
|
136
|
+
1.17.3
|
data/README.md
CHANGED
@@ -10,6 +10,18 @@ Uses `kubectl` inside.
|
|
10
10
|
|
11
11
|
This tool is in early alpha stage.
|
12
12
|
|
13
|
+
## Features
|
14
|
+
|
15
|
+
* Run pod based on deployment spec
|
16
|
+
* Possibility to auto-delete pod after command is done
|
17
|
+
* Search for applicable pods before starting new one
|
18
|
+
|
19
|
+
Incoming:
|
20
|
+
|
21
|
+
* specify different `resources` for containers
|
22
|
+
* specify your own command to keep pod running (instead of /bin/sh and sleep)
|
23
|
+
* specify actual command (currently it's `/bin/sh`)
|
24
|
+
|
13
25
|
## Installation
|
14
26
|
|
15
27
|
Dependencies:
|
@@ -49,7 +49,7 @@ module Kuberun
|
|
49
49
|
private
|
50
50
|
|
51
51
|
def create_pod_from_deployment(output)
|
52
|
-
deployment = Kuberun::Kubectl.get(resource: 'deployment', resource_name: @deployment_name, options: '
|
52
|
+
deployment = Kuberun::Kubectl.get(resource: 'deployment', resource_name: @deployment_name, options: '')
|
53
53
|
pod_template = deployment['spec']['template']
|
54
54
|
prepare_pod_template(pod_template)
|
55
55
|
|
@@ -80,7 +80,26 @@ module Kuberun
|
|
80
80
|
container['args'] = ['while true; do sleep 1000; done']
|
81
81
|
end
|
82
82
|
|
83
|
-
pod_template['spec'].delete('
|
83
|
+
pod_template['spec'].delete('priority')
|
84
|
+
pod_template['spec']['priorityClassName'] = 'system-cluster-critical'
|
85
|
+
pod_template['spec']['affinity'] = {
|
86
|
+
'podAntiAffinity' => {
|
87
|
+
'requiredDuringSchedulingIgnoredDuringExecution' => [
|
88
|
+
{
|
89
|
+
'labelSelector' => {
|
90
|
+
'matchExpressions' => [
|
91
|
+
{
|
92
|
+
'key' => 'spot',
|
93
|
+
'operator' => 'In',
|
94
|
+
'values' => ['true']
|
95
|
+
}
|
96
|
+
]
|
97
|
+
},
|
98
|
+
'topologyKey' => 'kubernetes.io/hostname',
|
99
|
+
}
|
100
|
+
]
|
101
|
+
}
|
102
|
+
}
|
84
103
|
pod_template['spec']['terminationGracePeriodSeconds'] = 0
|
85
104
|
end
|
86
105
|
|
data/lib/kuberun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kuberun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kruczjak
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pastel
|
@@ -371,7 +371,7 @@ homepage: https://boostcom.com
|
|
371
371
|
licenses:
|
372
372
|
- MIT
|
373
373
|
metadata: {}
|
374
|
-
post_install_message:
|
374
|
+
post_install_message:
|
375
375
|
rdoc_options: []
|
376
376
|
require_paths:
|
377
377
|
- lib
|
@@ -386,9 +386,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
386
386
|
- !ruby/object:Gem::Version
|
387
387
|
version: '0'
|
388
388
|
requirements: []
|
389
|
-
|
390
|
-
|
391
|
-
signing_key:
|
389
|
+
rubygems_version: 3.1.2
|
390
|
+
signing_key:
|
392
391
|
specification_version: 4
|
393
392
|
summary: CLI to run pods based on deployments
|
394
393
|
test_files: []
|