kube_queue 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.travis.yml +21 -2
- data/Appraisals +11 -0
- data/CHANGELOG.md +5 -0
- data/README.md +2 -0
- data/gemfiles/.bundle/config +2 -0
- data/gemfiles/rails_5.1.gemfile +7 -0
- data/gemfiles/rails_5.1.gemfile.lock +177 -0
- data/gemfiles/rails_5.2.gemfile +7 -0
- data/gemfiles/rails_5.2.gemfile.lock +177 -0
- data/gemfiles/rails_6.0.gemfile +7 -0
- data/gemfiles/rails_6.0.gemfile.lock +179 -0
- data/kube_queue.gemspec +2 -1
- data/lib/kube_queue/job_specification.rb +1 -1
- data/lib/kube_queue/version.rb +1 -1
- data/lib/kube_queue/worker.rb +16 -15
- data/lib/kube_queue/worker/dsl.rb +1 -1
- data/template/job.yaml +8 -4
- metadata +27 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 623eedfbb9428290c5554f51b59a9fb57fcba8985e3fb218d37bd584f3678d38
|
4
|
+
data.tar.gz: 118bb881650d12acd3f311da1584e5926a07f59671d6f3900afab8f2975f3af7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72f7b730080d93aa1a79ca06aafbe26f7295a4f0960e26ac4a0f1c73a326439fbd0e724d4bac7ef6aafdd1ab7ddfc0a20585d308824b6c792c327980c0f8f855
|
7
|
+
data.tar.gz: 4645f7c858c59d0308cd30fce184e41016be3662f293cbdfe4a752c46b70ac4474e817d710857e5e7ab3bd0129359803a34ecf6a624c5956d179903e9b7fed92
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,7 +1,26 @@
|
|
1
|
-
---
|
2
1
|
sudo: false
|
3
2
|
language: ruby
|
4
3
|
cache: bundler
|
5
4
|
rvm:
|
6
|
-
|
5
|
+
- 2.4.5
|
6
|
+
- 2.6.3
|
7
|
+
- ruby-head
|
8
|
+
branches:
|
9
|
+
only:
|
10
|
+
- master
|
7
11
|
before_install: gem install bundler -v 2.0.2
|
12
|
+
script:
|
13
|
+
- bundle exec rspec
|
14
|
+
gem_files:
|
15
|
+
- gemfiles/rails_5.1.gemfile
|
16
|
+
- gemfiles/rails_5.2.gemfile
|
17
|
+
- gemfiles/rails_6.0.gemfile
|
18
|
+
matrix:
|
19
|
+
allow_failures:
|
20
|
+
- rvm: ruby-head
|
21
|
+
fast_finish: true
|
22
|
+
notifications:
|
23
|
+
slack:
|
24
|
+
secure: P996C+m/+CeH9RacgDyVWYY7jdOKR3/FA194GwXE+l5Yc51AtH0Us8EWhaizNUPmxIO9DI8wFrX+/RYTl0mV2dOAToj655yTNIQAPh+FFHbC3dpjwHejXP90cWstwdR/PBPsy71sMk476RQPl4jWzR+OOoCQdyEWPUlYnVhu+DR2Tt54ixcoZqb7Li/s5gQCY7RDXBlO/lNA4nvslHTUTtdlHYM9MnUFtvYa/aCQ16bvHk/HdzUKUiZ1mZ1q+DDc104KFwcTxRMyyP3zfL0A5fNFsUoajVkifPBOi+3rrj2dlrwQJp7bv/WdBrv8R7WXbZLOx3EOZLnFzqmy63Hb2n6rbpAtYuILdAzmL4cW9/sGZCbnCUsBmwh/xk3/wTEUdHHqgLIkjPsvD0Z/AJmSf/ub3rsBG9mIvpDSyB+ok0ymsqda2W3Fe5+8zJ7AikO8W9OwhBoGLOaTBJKxl7ujy+z6BZjt4FaOUtl1StxjVk7j6Pzc0Io8EOronoe+PMJF2AthdtSZglf0CvHaKT43nh+mKmXv8hk2o/APpuSGdH5/0HBxyiziSZZJisEBHAkk8Zyv2SDG7KWyjz3GVpRBbFeRG7zZEbZ8QJSfN2d6eqa7lYEnyyTXZk2irkCLuMS7WJgGybgGPna49sj4/9YoithMPomPIz9Zt2/3SsKX/nc=
|
25
|
+
on_success: change
|
26
|
+
on_failure: always
|
data/Appraisals
ADDED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -0,0 +1,177 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
kube_queue (0.4.0)
|
5
|
+
k8s-client
|
6
|
+
thor
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activejob (5.1.7)
|
12
|
+
activesupport (= 5.1.7)
|
13
|
+
globalid (>= 0.3.6)
|
14
|
+
activesupport (5.1.7)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
i18n (>= 0.7, < 2)
|
17
|
+
minitest (~> 5.1)
|
18
|
+
tzinfo (~> 1.1)
|
19
|
+
appraisal (2.2.0)
|
20
|
+
bundler
|
21
|
+
rake
|
22
|
+
thor (>= 0.14.0)
|
23
|
+
ast (2.4.0)
|
24
|
+
byebug (11.0.1)
|
25
|
+
coderay (1.1.2)
|
26
|
+
concurrent-ruby (1.1.5)
|
27
|
+
diff-lcs (1.3)
|
28
|
+
dry-configurable (0.8.3)
|
29
|
+
concurrent-ruby (~> 1.0)
|
30
|
+
dry-core (~> 0.4, >= 0.4.7)
|
31
|
+
dry-container (0.7.2)
|
32
|
+
concurrent-ruby (~> 1.0)
|
33
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
34
|
+
dry-core (0.4.9)
|
35
|
+
concurrent-ruby (~> 1.0)
|
36
|
+
dry-equalizer (0.2.2)
|
37
|
+
dry-inflector (0.1.2)
|
38
|
+
dry-logic (0.6.1)
|
39
|
+
concurrent-ruby (~> 1.0)
|
40
|
+
dry-core (~> 0.2)
|
41
|
+
dry-equalizer (~> 0.2)
|
42
|
+
dry-struct (0.5.1)
|
43
|
+
dry-core (~> 0.4, >= 0.4.3)
|
44
|
+
dry-equalizer (~> 0.2)
|
45
|
+
dry-types (~> 0.13)
|
46
|
+
ice_nine (~> 0.11)
|
47
|
+
dry-types (0.13.4)
|
48
|
+
concurrent-ruby (~> 1.0)
|
49
|
+
dry-container (~> 0.3)
|
50
|
+
dry-core (~> 0.4, >= 0.4.4)
|
51
|
+
dry-equalizer (~> 0.2)
|
52
|
+
dry-inflector (~> 0.1, >= 0.1.2)
|
53
|
+
dry-logic (~> 0.4, >= 0.4.2)
|
54
|
+
erbh (0.1.3)
|
55
|
+
excon (0.66.0)
|
56
|
+
ffi (1.11.1)
|
57
|
+
formatador (0.2.5)
|
58
|
+
globalid (0.4.2)
|
59
|
+
activesupport (>= 4.2.0)
|
60
|
+
guard (2.15.0)
|
61
|
+
formatador (>= 0.2.4)
|
62
|
+
listen (>= 2.7, < 4.0)
|
63
|
+
lumberjack (>= 1.0.12, < 2.0)
|
64
|
+
nenv (~> 0.1)
|
65
|
+
notiffany (~> 0.0)
|
66
|
+
pry (>= 0.9.12)
|
67
|
+
shellany (~> 0.0)
|
68
|
+
thor (>= 0.18.1)
|
69
|
+
guard-compat (1.2.1)
|
70
|
+
guard-rspec (4.7.3)
|
71
|
+
guard (~> 2.1)
|
72
|
+
guard-compat (~> 1.1)
|
73
|
+
rspec (>= 2.99.0, < 4.0)
|
74
|
+
guard-rubocop (1.3.0)
|
75
|
+
guard (~> 2.0)
|
76
|
+
rubocop (~> 0.20)
|
77
|
+
hashdiff (1.0.0)
|
78
|
+
i18n (1.6.0)
|
79
|
+
concurrent-ruby (~> 1.0)
|
80
|
+
ice_nine (0.11.2)
|
81
|
+
jaro_winkler (1.5.3)
|
82
|
+
jsonpath (0.9.9)
|
83
|
+
multi_json
|
84
|
+
to_regexp (~> 0.2.1)
|
85
|
+
k8s-client (0.10.3)
|
86
|
+
dry-struct (~> 0.5.0)
|
87
|
+
dry-types (~> 0.13.0)
|
88
|
+
excon (~> 0.66)
|
89
|
+
hashdiff (~> 1.0.0)
|
90
|
+
jsonpath (~> 0.9.5)
|
91
|
+
recursive-open-struct (~> 1.1.0)
|
92
|
+
yajl-ruby (~> 1.4.0)
|
93
|
+
yaml-safe_load_stream (~> 0.1)
|
94
|
+
listen (3.1.5)
|
95
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
96
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
97
|
+
ruby_dep (~> 1.2)
|
98
|
+
lumberjack (1.0.13)
|
99
|
+
method_source (0.9.2)
|
100
|
+
minitest (5.11.3)
|
101
|
+
multi_json (1.13.1)
|
102
|
+
nenv (0.3.0)
|
103
|
+
notiffany (0.1.3)
|
104
|
+
nenv (~> 0.1)
|
105
|
+
shellany (~> 0.0)
|
106
|
+
parallel (1.17.0)
|
107
|
+
parser (2.6.3.0)
|
108
|
+
ast (~> 2.4.0)
|
109
|
+
pry (0.12.2)
|
110
|
+
coderay (~> 1.1.0)
|
111
|
+
method_source (~> 0.9.0)
|
112
|
+
pry-byebug (3.7.0)
|
113
|
+
byebug (~> 11.0)
|
114
|
+
pry (~> 0.10)
|
115
|
+
rainbow (3.0.0)
|
116
|
+
rake (10.5.0)
|
117
|
+
rb-fsevent (0.10.3)
|
118
|
+
rb-inotify (0.10.0)
|
119
|
+
ffi (~> 1.0)
|
120
|
+
recursive-open-struct (1.1.0)
|
121
|
+
rspec (3.8.0)
|
122
|
+
rspec-core (~> 3.8.0)
|
123
|
+
rspec-expectations (~> 3.8.0)
|
124
|
+
rspec-mocks (~> 3.8.0)
|
125
|
+
rspec-core (3.8.2)
|
126
|
+
rspec-support (~> 3.8.0)
|
127
|
+
rspec-expectations (3.8.4)
|
128
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
129
|
+
rspec-support (~> 3.8.0)
|
130
|
+
rspec-mocks (3.8.1)
|
131
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
132
|
+
rspec-support (~> 3.8.0)
|
133
|
+
rspec-support (3.8.2)
|
134
|
+
rubocop (0.74.0)
|
135
|
+
jaro_winkler (~> 1.5.1)
|
136
|
+
parallel (~> 1.10)
|
137
|
+
parser (>= 2.6)
|
138
|
+
rainbow (>= 2.2.2, < 4.0)
|
139
|
+
ruby-progressbar (~> 1.7)
|
140
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
141
|
+
rubocop-performance (1.4.1)
|
142
|
+
rubocop (>= 0.71.0)
|
143
|
+
rubocop-rspec (1.35.0)
|
144
|
+
rubocop (>= 0.60.0)
|
145
|
+
ruby-progressbar (1.10.1)
|
146
|
+
ruby_dep (1.5.0)
|
147
|
+
shellany (0.0.1)
|
148
|
+
thor (0.20.3)
|
149
|
+
thread_safe (0.3.6)
|
150
|
+
to_regexp (0.2.1)
|
151
|
+
tzinfo (1.2.5)
|
152
|
+
thread_safe (~> 0.1)
|
153
|
+
unicode-display_width (1.6.0)
|
154
|
+
yajl-ruby (1.4.1)
|
155
|
+
yaml-safe_load_stream (0.1.1)
|
156
|
+
|
157
|
+
PLATFORMS
|
158
|
+
ruby
|
159
|
+
|
160
|
+
DEPENDENCIES
|
161
|
+
activejob (= 5.1.7)
|
162
|
+
appraisal
|
163
|
+
bundler (~> 2.0)
|
164
|
+
erbh
|
165
|
+
guard
|
166
|
+
guard-rspec
|
167
|
+
guard-rubocop
|
168
|
+
kube_queue!
|
169
|
+
pry-byebug
|
170
|
+
rake (~> 10.0)
|
171
|
+
rspec (~> 3.0)
|
172
|
+
rubocop
|
173
|
+
rubocop-performance
|
174
|
+
rubocop-rspec
|
175
|
+
|
176
|
+
BUNDLED WITH
|
177
|
+
2.0.2
|
@@ -0,0 +1,177 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
kube_queue (0.4.0)
|
5
|
+
k8s-client
|
6
|
+
thor
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activejob (5.2.3)
|
12
|
+
activesupport (= 5.2.3)
|
13
|
+
globalid (>= 0.3.6)
|
14
|
+
activesupport (5.2.3)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
i18n (>= 0.7, < 2)
|
17
|
+
minitest (~> 5.1)
|
18
|
+
tzinfo (~> 1.1)
|
19
|
+
appraisal (2.2.0)
|
20
|
+
bundler
|
21
|
+
rake
|
22
|
+
thor (>= 0.14.0)
|
23
|
+
ast (2.4.0)
|
24
|
+
byebug (11.0.1)
|
25
|
+
coderay (1.1.2)
|
26
|
+
concurrent-ruby (1.1.5)
|
27
|
+
diff-lcs (1.3)
|
28
|
+
dry-configurable (0.8.3)
|
29
|
+
concurrent-ruby (~> 1.0)
|
30
|
+
dry-core (~> 0.4, >= 0.4.7)
|
31
|
+
dry-container (0.7.2)
|
32
|
+
concurrent-ruby (~> 1.0)
|
33
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
34
|
+
dry-core (0.4.9)
|
35
|
+
concurrent-ruby (~> 1.0)
|
36
|
+
dry-equalizer (0.2.2)
|
37
|
+
dry-inflector (0.1.2)
|
38
|
+
dry-logic (0.6.1)
|
39
|
+
concurrent-ruby (~> 1.0)
|
40
|
+
dry-core (~> 0.2)
|
41
|
+
dry-equalizer (~> 0.2)
|
42
|
+
dry-struct (0.5.1)
|
43
|
+
dry-core (~> 0.4, >= 0.4.3)
|
44
|
+
dry-equalizer (~> 0.2)
|
45
|
+
dry-types (~> 0.13)
|
46
|
+
ice_nine (~> 0.11)
|
47
|
+
dry-types (0.13.4)
|
48
|
+
concurrent-ruby (~> 1.0)
|
49
|
+
dry-container (~> 0.3)
|
50
|
+
dry-core (~> 0.4, >= 0.4.4)
|
51
|
+
dry-equalizer (~> 0.2)
|
52
|
+
dry-inflector (~> 0.1, >= 0.1.2)
|
53
|
+
dry-logic (~> 0.4, >= 0.4.2)
|
54
|
+
erbh (0.1.3)
|
55
|
+
excon (0.66.0)
|
56
|
+
ffi (1.11.1)
|
57
|
+
formatador (0.2.5)
|
58
|
+
globalid (0.4.2)
|
59
|
+
activesupport (>= 4.2.0)
|
60
|
+
guard (2.15.0)
|
61
|
+
formatador (>= 0.2.4)
|
62
|
+
listen (>= 2.7, < 4.0)
|
63
|
+
lumberjack (>= 1.0.12, < 2.0)
|
64
|
+
nenv (~> 0.1)
|
65
|
+
notiffany (~> 0.0)
|
66
|
+
pry (>= 0.9.12)
|
67
|
+
shellany (~> 0.0)
|
68
|
+
thor (>= 0.18.1)
|
69
|
+
guard-compat (1.2.1)
|
70
|
+
guard-rspec (4.7.3)
|
71
|
+
guard (~> 2.1)
|
72
|
+
guard-compat (~> 1.1)
|
73
|
+
rspec (>= 2.99.0, < 4.0)
|
74
|
+
guard-rubocop (1.3.0)
|
75
|
+
guard (~> 2.0)
|
76
|
+
rubocop (~> 0.20)
|
77
|
+
hashdiff (1.0.0)
|
78
|
+
i18n (1.6.0)
|
79
|
+
concurrent-ruby (~> 1.0)
|
80
|
+
ice_nine (0.11.2)
|
81
|
+
jaro_winkler (1.5.3)
|
82
|
+
jsonpath (0.9.9)
|
83
|
+
multi_json
|
84
|
+
to_regexp (~> 0.2.1)
|
85
|
+
k8s-client (0.10.3)
|
86
|
+
dry-struct (~> 0.5.0)
|
87
|
+
dry-types (~> 0.13.0)
|
88
|
+
excon (~> 0.66)
|
89
|
+
hashdiff (~> 1.0.0)
|
90
|
+
jsonpath (~> 0.9.5)
|
91
|
+
recursive-open-struct (~> 1.1.0)
|
92
|
+
yajl-ruby (~> 1.4.0)
|
93
|
+
yaml-safe_load_stream (~> 0.1)
|
94
|
+
listen (3.1.5)
|
95
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
96
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
97
|
+
ruby_dep (~> 1.2)
|
98
|
+
lumberjack (1.0.13)
|
99
|
+
method_source (0.9.2)
|
100
|
+
minitest (5.11.3)
|
101
|
+
multi_json (1.13.1)
|
102
|
+
nenv (0.3.0)
|
103
|
+
notiffany (0.1.3)
|
104
|
+
nenv (~> 0.1)
|
105
|
+
shellany (~> 0.0)
|
106
|
+
parallel (1.17.0)
|
107
|
+
parser (2.6.3.0)
|
108
|
+
ast (~> 2.4.0)
|
109
|
+
pry (0.12.2)
|
110
|
+
coderay (~> 1.1.0)
|
111
|
+
method_source (~> 0.9.0)
|
112
|
+
pry-byebug (3.7.0)
|
113
|
+
byebug (~> 11.0)
|
114
|
+
pry (~> 0.10)
|
115
|
+
rainbow (3.0.0)
|
116
|
+
rake (10.5.0)
|
117
|
+
rb-fsevent (0.10.3)
|
118
|
+
rb-inotify (0.10.0)
|
119
|
+
ffi (~> 1.0)
|
120
|
+
recursive-open-struct (1.1.0)
|
121
|
+
rspec (3.8.0)
|
122
|
+
rspec-core (~> 3.8.0)
|
123
|
+
rspec-expectations (~> 3.8.0)
|
124
|
+
rspec-mocks (~> 3.8.0)
|
125
|
+
rspec-core (3.8.2)
|
126
|
+
rspec-support (~> 3.8.0)
|
127
|
+
rspec-expectations (3.8.4)
|
128
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
129
|
+
rspec-support (~> 3.8.0)
|
130
|
+
rspec-mocks (3.8.1)
|
131
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
132
|
+
rspec-support (~> 3.8.0)
|
133
|
+
rspec-support (3.8.2)
|
134
|
+
rubocop (0.74.0)
|
135
|
+
jaro_winkler (~> 1.5.1)
|
136
|
+
parallel (~> 1.10)
|
137
|
+
parser (>= 2.6)
|
138
|
+
rainbow (>= 2.2.2, < 4.0)
|
139
|
+
ruby-progressbar (~> 1.7)
|
140
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
141
|
+
rubocop-performance (1.4.1)
|
142
|
+
rubocop (>= 0.71.0)
|
143
|
+
rubocop-rspec (1.35.0)
|
144
|
+
rubocop (>= 0.60.0)
|
145
|
+
ruby-progressbar (1.10.1)
|
146
|
+
ruby_dep (1.5.0)
|
147
|
+
shellany (0.0.1)
|
148
|
+
thor (0.20.3)
|
149
|
+
thread_safe (0.3.6)
|
150
|
+
to_regexp (0.2.1)
|
151
|
+
tzinfo (1.2.5)
|
152
|
+
thread_safe (~> 0.1)
|
153
|
+
unicode-display_width (1.6.0)
|
154
|
+
yajl-ruby (1.4.1)
|
155
|
+
yaml-safe_load_stream (0.1.1)
|
156
|
+
|
157
|
+
PLATFORMS
|
158
|
+
ruby
|
159
|
+
|
160
|
+
DEPENDENCIES
|
161
|
+
activejob (= 5.2.3)
|
162
|
+
appraisal
|
163
|
+
bundler (~> 2.0)
|
164
|
+
erbh
|
165
|
+
guard
|
166
|
+
guard-rspec
|
167
|
+
guard-rubocop
|
168
|
+
kube_queue!
|
169
|
+
pry-byebug
|
170
|
+
rake (~> 10.0)
|
171
|
+
rspec (~> 3.0)
|
172
|
+
rubocop
|
173
|
+
rubocop-performance
|
174
|
+
rubocop-rspec
|
175
|
+
|
176
|
+
BUNDLED WITH
|
177
|
+
2.0.2
|
@@ -0,0 +1,179 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
kube_queue (0.4.0)
|
5
|
+
k8s-client
|
6
|
+
thor
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activejob (6.0.0.beta2)
|
12
|
+
activesupport (= 6.0.0.beta2)
|
13
|
+
globalid (>= 0.3.6)
|
14
|
+
activesupport (6.0.0.beta2)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
i18n (>= 0.7, < 2)
|
17
|
+
minitest (~> 5.1)
|
18
|
+
tzinfo (~> 1.1)
|
19
|
+
zeitwerk (~> 1.3, >= 1.3.1)
|
20
|
+
appraisal (2.2.0)
|
21
|
+
bundler
|
22
|
+
rake
|
23
|
+
thor (>= 0.14.0)
|
24
|
+
ast (2.4.0)
|
25
|
+
byebug (11.0.1)
|
26
|
+
coderay (1.1.2)
|
27
|
+
concurrent-ruby (1.1.5)
|
28
|
+
diff-lcs (1.3)
|
29
|
+
dry-configurable (0.8.3)
|
30
|
+
concurrent-ruby (~> 1.0)
|
31
|
+
dry-core (~> 0.4, >= 0.4.7)
|
32
|
+
dry-container (0.7.2)
|
33
|
+
concurrent-ruby (~> 1.0)
|
34
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
35
|
+
dry-core (0.4.9)
|
36
|
+
concurrent-ruby (~> 1.0)
|
37
|
+
dry-equalizer (0.2.2)
|
38
|
+
dry-inflector (0.1.2)
|
39
|
+
dry-logic (0.6.1)
|
40
|
+
concurrent-ruby (~> 1.0)
|
41
|
+
dry-core (~> 0.2)
|
42
|
+
dry-equalizer (~> 0.2)
|
43
|
+
dry-struct (0.5.1)
|
44
|
+
dry-core (~> 0.4, >= 0.4.3)
|
45
|
+
dry-equalizer (~> 0.2)
|
46
|
+
dry-types (~> 0.13)
|
47
|
+
ice_nine (~> 0.11)
|
48
|
+
dry-types (0.13.4)
|
49
|
+
concurrent-ruby (~> 1.0)
|
50
|
+
dry-container (~> 0.3)
|
51
|
+
dry-core (~> 0.4, >= 0.4.4)
|
52
|
+
dry-equalizer (~> 0.2)
|
53
|
+
dry-inflector (~> 0.1, >= 0.1.2)
|
54
|
+
dry-logic (~> 0.4, >= 0.4.2)
|
55
|
+
erbh (0.1.3)
|
56
|
+
excon (0.66.0)
|
57
|
+
ffi (1.11.1)
|
58
|
+
formatador (0.2.5)
|
59
|
+
globalid (0.4.2)
|
60
|
+
activesupport (>= 4.2.0)
|
61
|
+
guard (2.15.0)
|
62
|
+
formatador (>= 0.2.4)
|
63
|
+
listen (>= 2.7, < 4.0)
|
64
|
+
lumberjack (>= 1.0.12, < 2.0)
|
65
|
+
nenv (~> 0.1)
|
66
|
+
notiffany (~> 0.0)
|
67
|
+
pry (>= 0.9.12)
|
68
|
+
shellany (~> 0.0)
|
69
|
+
thor (>= 0.18.1)
|
70
|
+
guard-compat (1.2.1)
|
71
|
+
guard-rspec (4.7.3)
|
72
|
+
guard (~> 2.1)
|
73
|
+
guard-compat (~> 1.1)
|
74
|
+
rspec (>= 2.99.0, < 4.0)
|
75
|
+
guard-rubocop (1.3.0)
|
76
|
+
guard (~> 2.0)
|
77
|
+
rubocop (~> 0.20)
|
78
|
+
hashdiff (1.0.0)
|
79
|
+
i18n (1.6.0)
|
80
|
+
concurrent-ruby (~> 1.0)
|
81
|
+
ice_nine (0.11.2)
|
82
|
+
jaro_winkler (1.5.3)
|
83
|
+
jsonpath (0.9.9)
|
84
|
+
multi_json
|
85
|
+
to_regexp (~> 0.2.1)
|
86
|
+
k8s-client (0.10.3)
|
87
|
+
dry-struct (~> 0.5.0)
|
88
|
+
dry-types (~> 0.13.0)
|
89
|
+
excon (~> 0.66)
|
90
|
+
hashdiff (~> 1.0.0)
|
91
|
+
jsonpath (~> 0.9.5)
|
92
|
+
recursive-open-struct (~> 1.1.0)
|
93
|
+
yajl-ruby (~> 1.4.0)
|
94
|
+
yaml-safe_load_stream (~> 0.1)
|
95
|
+
listen (3.1.5)
|
96
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
97
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
98
|
+
ruby_dep (~> 1.2)
|
99
|
+
lumberjack (1.0.13)
|
100
|
+
method_source (0.9.2)
|
101
|
+
minitest (5.11.3)
|
102
|
+
multi_json (1.13.1)
|
103
|
+
nenv (0.3.0)
|
104
|
+
notiffany (0.1.3)
|
105
|
+
nenv (~> 0.1)
|
106
|
+
shellany (~> 0.0)
|
107
|
+
parallel (1.17.0)
|
108
|
+
parser (2.6.3.0)
|
109
|
+
ast (~> 2.4.0)
|
110
|
+
pry (0.12.2)
|
111
|
+
coderay (~> 1.1.0)
|
112
|
+
method_source (~> 0.9.0)
|
113
|
+
pry-byebug (3.7.0)
|
114
|
+
byebug (~> 11.0)
|
115
|
+
pry (~> 0.10)
|
116
|
+
rainbow (3.0.0)
|
117
|
+
rake (10.5.0)
|
118
|
+
rb-fsevent (0.10.3)
|
119
|
+
rb-inotify (0.10.0)
|
120
|
+
ffi (~> 1.0)
|
121
|
+
recursive-open-struct (1.1.0)
|
122
|
+
rspec (3.8.0)
|
123
|
+
rspec-core (~> 3.8.0)
|
124
|
+
rspec-expectations (~> 3.8.0)
|
125
|
+
rspec-mocks (~> 3.8.0)
|
126
|
+
rspec-core (3.8.2)
|
127
|
+
rspec-support (~> 3.8.0)
|
128
|
+
rspec-expectations (3.8.4)
|
129
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
130
|
+
rspec-support (~> 3.8.0)
|
131
|
+
rspec-mocks (3.8.1)
|
132
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
133
|
+
rspec-support (~> 3.8.0)
|
134
|
+
rspec-support (3.8.2)
|
135
|
+
rubocop (0.74.0)
|
136
|
+
jaro_winkler (~> 1.5.1)
|
137
|
+
parallel (~> 1.10)
|
138
|
+
parser (>= 2.6)
|
139
|
+
rainbow (>= 2.2.2, < 4.0)
|
140
|
+
ruby-progressbar (~> 1.7)
|
141
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
142
|
+
rubocop-performance (1.4.1)
|
143
|
+
rubocop (>= 0.71.0)
|
144
|
+
rubocop-rspec (1.35.0)
|
145
|
+
rubocop (>= 0.60.0)
|
146
|
+
ruby-progressbar (1.10.1)
|
147
|
+
ruby_dep (1.5.0)
|
148
|
+
shellany (0.0.1)
|
149
|
+
thor (0.20.3)
|
150
|
+
thread_safe (0.3.6)
|
151
|
+
to_regexp (0.2.1)
|
152
|
+
tzinfo (1.2.5)
|
153
|
+
thread_safe (~> 0.1)
|
154
|
+
unicode-display_width (1.6.0)
|
155
|
+
yajl-ruby (1.4.1)
|
156
|
+
yaml-safe_load_stream (0.1.1)
|
157
|
+
zeitwerk (1.4.3)
|
158
|
+
|
159
|
+
PLATFORMS
|
160
|
+
ruby
|
161
|
+
|
162
|
+
DEPENDENCIES
|
163
|
+
activejob (= 6.0.0.beta2)
|
164
|
+
appraisal
|
165
|
+
bundler (~> 2.0)
|
166
|
+
erbh
|
167
|
+
guard
|
168
|
+
guard-rspec
|
169
|
+
guard-rubocop
|
170
|
+
kube_queue!
|
171
|
+
pry-byebug
|
172
|
+
rake (~> 10.0)
|
173
|
+
rspec (~> 3.0)
|
174
|
+
rubocop
|
175
|
+
rubocop-performance
|
176
|
+
rubocop-rspec
|
177
|
+
|
178
|
+
BUNDLED WITH
|
179
|
+
2.0.2
|
data/kube_queue.gemspec
CHANGED
@@ -30,12 +30,13 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
32
32
|
spec.add_development_dependency "erbh"
|
33
|
-
spec.add_development_dependency "hash_modern_inspect"
|
34
33
|
spec.add_development_dependency "rubocop"
|
35
34
|
spec.add_development_dependency "rubocop-performance"
|
35
|
+
spec.add_development_dependency "rubocop-rspec"
|
36
36
|
spec.add_development_dependency "pry-byebug"
|
37
37
|
spec.add_development_dependency "guard"
|
38
38
|
spec.add_development_dependency "guard-rspec"
|
39
39
|
spec.add_development_dependency "guard-rubocop"
|
40
40
|
spec.add_development_dependency "activejob"
|
41
|
+
spec.add_development_dependency "appraisal"
|
41
42
|
end
|
@@ -12,7 +12,7 @@ module KubeQueue
|
|
12
12
|
|
13
13
|
attr_writer :image, :namespace, :worker_name, :command,
|
14
14
|
:container_name, :restart_policy, :job_labels, :pod_labels,
|
15
|
-
:env_from_config_map, :env_from_secret, :concurrent_policy
|
15
|
+
:env_from_config_map, :env_from_secret, :concurrent_policy, :env
|
16
16
|
|
17
17
|
def initialize(job_class)
|
18
18
|
@job_class = job_class
|
data/lib/kube_queue/version.rb
CHANGED
data/lib/kube_queue/worker.rb
CHANGED
@@ -12,6 +12,16 @@ module KubeQueue
|
|
12
12
|
module ClassMethods
|
13
13
|
include DSL
|
14
14
|
|
15
|
+
attr_writer :template
|
16
|
+
|
17
|
+
def template
|
18
|
+
@template ||= File.expand_path('../../../template/job.yaml', __FILE__)
|
19
|
+
end
|
20
|
+
|
21
|
+
def active_job?
|
22
|
+
defined?(ActiveJob) && ancestors.include?(ActiveJob::Base)
|
23
|
+
end
|
24
|
+
|
15
25
|
def list
|
16
26
|
namespace = job_spec.namespace
|
17
27
|
|
@@ -28,10 +38,10 @@ module KubeQueue
|
|
28
38
|
|
29
39
|
name = job_spec.job_name(job_id)
|
30
40
|
|
31
|
-
res = KubeQueue.client.get_job(
|
41
|
+
res = KubeQueue.client.get_job(namespace, name)
|
32
42
|
worker = KubeQueue.fetch_worker(res.metadata.annotations['kube-queue-job-class'])
|
33
43
|
|
34
|
-
payload = deserialize_annotation_payload(res.annotations['kube-queue-job-payload'])
|
44
|
+
payload = deserialize_annotation_payload(res.metadata.annotations['kube-queue-job-payload'])
|
35
45
|
|
36
46
|
job = worker.new(*payload)
|
37
47
|
job.resource = res
|
@@ -55,7 +65,7 @@ module KubeQueue
|
|
55
65
|
end
|
56
66
|
|
57
67
|
def read_template
|
58
|
-
File.read(
|
68
|
+
File.read(template)
|
59
69
|
end
|
60
70
|
|
61
71
|
def manifest
|
@@ -68,22 +78,13 @@ module KubeQueue
|
|
68
78
|
return payload if payload.empty?
|
69
79
|
|
70
80
|
payload = JSON.parse(payload)
|
81
|
+
|
71
82
|
# Compatibility for ActiveJob serialized payload
|
72
83
|
payload = [payload] unless payload.is_a?(Array)
|
73
84
|
|
74
|
-
if defined?(ActiveJob::Arguments)
|
75
|
-
begin
|
76
|
-
payload = ActiveJob::Arguments.deserialize(payload)
|
77
|
-
rescue ActiveJob::DeserializationError => e
|
78
|
-
logger.error e.message
|
79
|
-
logger.error "#{payload} can not deserialized"
|
80
|
-
end
|
81
|
-
end
|
85
|
+
payload = ActiveJob::Arguments.deserialize(payload) if defined?(ActiveJob::Arguments)
|
82
86
|
|
83
87
|
payload
|
84
|
-
rescue JSON::ParseError => e
|
85
|
-
logger.error e.message
|
86
|
-
logger.error "#{payload} can not deserialized"
|
87
88
|
end
|
88
89
|
end
|
89
90
|
|
@@ -154,7 +155,7 @@ module KubeQueue
|
|
154
155
|
end
|
155
156
|
|
156
157
|
def serialized_payload
|
157
|
-
if
|
158
|
+
if self.class.active_job?
|
158
159
|
ActiveJob::Arguments.serialize(arguments)
|
159
160
|
else
|
160
161
|
arguments
|
data/template/job.yaml
CHANGED
@@ -2,7 +2,7 @@ apiVersion: batch/v1
|
|
2
2
|
kind: Job
|
3
3
|
metadata:
|
4
4
|
annotations:
|
5
|
-
kube-queue-job-class: "<%= spec.job_class %>"
|
5
|
+
kube-queue-job-class: "<%= spec.job_class.name %>"
|
6
6
|
kube-queue-job-id: "<%= job.job_id %>"
|
7
7
|
kube-queue-job-payload: '<%= payload %>'
|
8
8
|
name: "<%= spec.job_name(job.job_id) %>"
|
@@ -10,19 +10,19 @@ metadata:
|
|
10
10
|
labels:
|
11
11
|
kube-queue-job: "true"
|
12
12
|
kube-queue-worker-name: "<%= spec.worker_name %>"
|
13
|
-
kube-queue-job-class: "<%= spec.job_class %>"
|
13
|
+
kube-queue-job-class: "<%= spec.job_class.name %>"
|
14
14
|
kube-queue-job-id: "<%= job.job_id %>"
|
15
15
|
spec:
|
16
16
|
template:
|
17
17
|
metadata:
|
18
18
|
annotations:
|
19
|
-
kube-queue-job-class: "<%= spec.job_class %>"
|
19
|
+
kube-queue-job-class: "<%= spec.job_class.name %>"
|
20
20
|
kube-queue-job-id: "<%= job.job_id %>"
|
21
21
|
kube-queue-job-payload: '<%= payload %>'
|
22
22
|
labels:
|
23
23
|
kube-queue-job: "true"
|
24
24
|
kube-queue-worker-name: "<%= spec.worker_name %>"
|
25
|
-
kube-queue-job-class: "<%= spec.job_class %>"
|
25
|
+
kube-queue-job-class: "<%= spec.job_class.name %>"
|
26
26
|
kube-queue-job-id: "<%= job.job_id %>"
|
27
27
|
<%- spec.job_labels.each do |key, value| %>
|
28
28
|
<%= key %>: "<%= value %>"
|
@@ -74,5 +74,9 @@ spec:
|
|
74
74
|
resources: {}
|
75
75
|
<%- end %>
|
76
76
|
restartPolicy: "<%= spec.restart_policy %>"
|
77
|
+
<%- if spec.backoff_limit %>
|
77
78
|
backoffLimit: <%= spec.backoff_limit %>
|
79
|
+
<%- end %>
|
80
|
+
<%- if spec.active_deadline_seconds %>
|
78
81
|
activeDeadlineSeconds: <%= spec.active_deadline_seconds %>
|
82
|
+
<%- end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kube_queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yuemori
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: k8s-client
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rubocop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop
|
112
|
+
name: rubocop-performance
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop-
|
126
|
+
name: rubocop-rspec
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: appraisal
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
209
223
|
description: A background job processing with Kubernetes job for Ruby
|
210
224
|
email:
|
211
225
|
- yuemori@aiming-inc.com
|
@@ -220,6 +234,7 @@ files:
|
|
220
234
|
- ".rspec"
|
221
235
|
- ".rubocop.yml"
|
222
236
|
- ".travis.yml"
|
237
|
+
- Appraisals
|
223
238
|
- CHANGELOG.md
|
224
239
|
- CODE_OF_CONDUCT.md
|
225
240
|
- Dockerfile
|
@@ -233,6 +248,13 @@ files:
|
|
233
248
|
- bin/setup
|
234
249
|
- cloudbuild.yaml
|
235
250
|
- exe/kube_queue
|
251
|
+
- gemfiles/.bundle/config
|
252
|
+
- gemfiles/rails_5.1.gemfile
|
253
|
+
- gemfiles/rails_5.1.gemfile.lock
|
254
|
+
- gemfiles/rails_5.2.gemfile
|
255
|
+
- gemfiles/rails_5.2.gemfile.lock
|
256
|
+
- gemfiles/rails_6.0.gemfile
|
257
|
+
- gemfiles/rails_6.0.gemfile.lock
|
236
258
|
- kube_queue.gemspec
|
237
259
|
- lib/active_job/adapters/kube_queue_adapter.rb
|
238
260
|
- lib/kube_queue.rb
|