kubeclient 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kubeclient might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +73 -0
- data/kubeclient.gemspec +0 -1
- data/lib/kubeclient.rb +3 -24
- data/lib/kubeclient/common.rb +153 -63
- data/lib/kubeclient/config.rb +2 -1
- data/lib/kubeclient/version.rb +1 -1
- data/test/cassettes/kubernetes_guestbook.yml +34 -1
- data/test/json/bindings_list.json +10 -0
- data/test/json/config_map_list.json +9 -0
- data/test/json/core_api_resource_list.json +181 -0
- data/test/json/pod_template_list.json +9 -0
- data/test/json/processed_template.json +27 -0
- data/test/test_common.rb +32 -0
- data/test/test_component_status.rb +6 -0
- data/test/test_endpoint.rb +5 -1
- data/test/test_guestbook_go.rb +1 -1
- data/test/test_kubeclient.rb +80 -7
- data/test/test_limit_range.rb +4 -0
- data/test/test_missing_methods.rb +42 -0
- data/test/test_namespace.rb +11 -2
- data/test/test_node.rb +6 -0
- data/test/test_persistent_volume.rb +6 -0
- data/test/test_persistent_volume_claim.rb +6 -0
- data/test/test_pod.rb +6 -0
- data/test/test_process_template.rb +44 -0
- data/test/test_replication_controller.rb +3 -0
- data/test/test_resource_quota.rb +3 -0
- data/test/test_secret.rb +13 -1
- data/test/test_service.rb +38 -7
- data/test/test_service_account.rb +6 -0
- data/test/test_watch.rb +16 -1
- metadata +18 -16
data/test/test_watch.rb
CHANGED
@@ -9,6 +9,10 @@ class TestWatch < MiniTest::Test
|
|
9
9
|
{ 'type' => 'DELETED', 'resourceVersion' => '1398' }
|
10
10
|
]
|
11
11
|
|
12
|
+
stub_request(:get, %r{/api/v1$})
|
13
|
+
.to_return(body: open_test_file('core_api_resource_list.json'),
|
14
|
+
status: 200)
|
15
|
+
|
12
16
|
stub_request(:get, %r{.*\/watch/pods})
|
13
17
|
.to_return(body: open_test_file('watch_stream.json'),
|
14
18
|
status: 200)
|
@@ -26,6 +30,9 @@ class TestWatch < MiniTest::Test
|
|
26
30
|
end
|
27
31
|
|
28
32
|
def test_watch_pod_failure
|
33
|
+
stub_request(:get, %r{/api/v1$})
|
34
|
+
.to_return(body: open_test_file('core_api_resource_list.json'),
|
35
|
+
status: 200)
|
29
36
|
stub_request(:get, %r{.*\/watch/pods}).to_return(status: 404)
|
30
37
|
|
31
38
|
client = Kubeclient::Client.new 'http://localhost:8080/api/', 'v1'
|
@@ -54,7 +61,9 @@ class TestWatch < MiniTest::Test
|
|
54
61
|
def test_watch_with_resource_version
|
55
62
|
api_host = 'http://localhost:8080/api'
|
56
63
|
version = '1995'
|
57
|
-
|
64
|
+
stub_request(:get, %r{/api/v1$})
|
65
|
+
.to_return(body: open_test_file('core_api_resource_list.json'),
|
66
|
+
status: 200)
|
58
67
|
stub_request(:get, %r{.*\/watch/events})
|
59
68
|
.to_return(body: open_test_file('watch_stream.json'),
|
60
69
|
status: 200)
|
@@ -72,6 +81,9 @@ class TestWatch < MiniTest::Test
|
|
72
81
|
api_host = 'http://localhost:8080/api'
|
73
82
|
selector = 'name=redis-master'
|
74
83
|
|
84
|
+
stub_request(:get, %r{/api/v1$})
|
85
|
+
.to_return(body: open_test_file('core_api_resource_list.json'),
|
86
|
+
status: 200)
|
75
87
|
stub_request(:get, %r{.*\/watch/events})
|
76
88
|
.to_return(body: open_test_file('watch_stream.json'),
|
77
89
|
status: 200)
|
@@ -89,6 +101,9 @@ class TestWatch < MiniTest::Test
|
|
89
101
|
api_host = 'http://localhost:8080/api'
|
90
102
|
selector = 'involvedObject.kind=Pod'
|
91
103
|
|
104
|
+
stub_request(:get, %r{/api/v1$})
|
105
|
+
.to_return(body: open_test_file('core_api_resource_list.json'),
|
106
|
+
status: 200)
|
92
107
|
stub_request(:get, %r{.*\/watch/events})
|
93
108
|
.to_return(body: open_test_file('watch_stream.json'),
|
94
109
|
status: 200)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kubeclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alissa Bonas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: activesupport
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: recursive-open-struct
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,8 +167,11 @@ files:
|
|
181
167
|
- test/config/external.kubeconfig
|
182
168
|
- test/config/nouser.kubeconfig
|
183
169
|
- test/config/userauth.kubeconfig
|
170
|
+
- test/json/bindings_list.json
|
184
171
|
- test/json/component_status.json
|
185
172
|
- test/json/component_status_list.json
|
173
|
+
- test/json/config_map_list.json
|
174
|
+
- test/json/core_api_resource_list.json
|
186
175
|
- test/json/created_endpoint.json
|
187
176
|
- test/json/created_namespace.json
|
188
177
|
- test/json/created_secret.json
|
@@ -205,6 +194,8 @@ files:
|
|
205
194
|
- test/json/persistent_volume_list.json
|
206
195
|
- test/json/pod.json
|
207
196
|
- test/json/pod_list.json
|
197
|
+
- test/json/pod_template_list.json
|
198
|
+
- test/json/processed_template.json
|
208
199
|
- test/json/replication_controller.json
|
209
200
|
- test/json/replication_controller_list.json
|
210
201
|
- test/json/resource_quota.json
|
@@ -219,6 +210,7 @@ files:
|
|
219
210
|
- test/json/service_update.json
|
220
211
|
- test/json/versions_list.json
|
221
212
|
- test/json/watch_stream.json
|
213
|
+
- test/test_common.rb
|
222
214
|
- test/test_component_status.rb
|
223
215
|
- test/test_config.rb
|
224
216
|
- test/test_endpoint.rb
|
@@ -226,12 +218,14 @@ files:
|
|
226
218
|
- test/test_helper.rb
|
227
219
|
- test/test_kubeclient.rb
|
228
220
|
- test/test_limit_range.rb
|
221
|
+
- test/test_missing_methods.rb
|
229
222
|
- test/test_namespace.rb
|
230
223
|
- test/test_node.rb
|
231
224
|
- test/test_persistent_volume.rb
|
232
225
|
- test/test_persistent_volume_claim.rb
|
233
226
|
- test/test_pod.rb
|
234
227
|
- test/test_pod_log.rb
|
228
|
+
- test/test_process_template.rb
|
235
229
|
- test/test_replication_controller.rb
|
236
230
|
- test/test_resource_quota.rb
|
237
231
|
- test/test_secret.rb
|
@@ -273,8 +267,11 @@ test_files:
|
|
273
267
|
- test/config/external.kubeconfig
|
274
268
|
- test/config/nouser.kubeconfig
|
275
269
|
- test/config/userauth.kubeconfig
|
270
|
+
- test/json/bindings_list.json
|
276
271
|
- test/json/component_status.json
|
277
272
|
- test/json/component_status_list.json
|
273
|
+
- test/json/config_map_list.json
|
274
|
+
- test/json/core_api_resource_list.json
|
278
275
|
- test/json/created_endpoint.json
|
279
276
|
- test/json/created_namespace.json
|
280
277
|
- test/json/created_secret.json
|
@@ -297,6 +294,8 @@ test_files:
|
|
297
294
|
- test/json/persistent_volume_list.json
|
298
295
|
- test/json/pod.json
|
299
296
|
- test/json/pod_list.json
|
297
|
+
- test/json/pod_template_list.json
|
298
|
+
- test/json/processed_template.json
|
300
299
|
- test/json/replication_controller.json
|
301
300
|
- test/json/replication_controller_list.json
|
302
301
|
- test/json/resource_quota.json
|
@@ -311,6 +310,7 @@ test_files:
|
|
311
310
|
- test/json/service_update.json
|
312
311
|
- test/json/versions_list.json
|
313
312
|
- test/json/watch_stream.json
|
313
|
+
- test/test_common.rb
|
314
314
|
- test/test_component_status.rb
|
315
315
|
- test/test_config.rb
|
316
316
|
- test/test_endpoint.rb
|
@@ -318,12 +318,14 @@ test_files:
|
|
318
318
|
- test/test_helper.rb
|
319
319
|
- test/test_kubeclient.rb
|
320
320
|
- test/test_limit_range.rb
|
321
|
+
- test/test_missing_methods.rb
|
321
322
|
- test/test_namespace.rb
|
322
323
|
- test/test_node.rb
|
323
324
|
- test/test_persistent_volume.rb
|
324
325
|
- test/test_persistent_volume_claim.rb
|
325
326
|
- test/test_pod.rb
|
326
327
|
- test/test_pod_log.rb
|
328
|
+
- test/test_process_template.rb
|
327
329
|
- test/test_replication_controller.rb
|
328
330
|
- test/test_resource_quota.rb
|
329
331
|
- test/test_secret.rb
|