kubeclient 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of kubeclient might be problematic. Click here for more details.

Files changed (39) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +11 -1
  3. data/README.md +18 -0
  4. data/RELEASING.md +40 -40
  5. data/lib/kubeclient/common.rb +57 -22
  6. data/lib/kubeclient/entity_list.rb +7 -2
  7. data/lib/kubeclient/version.rb +1 -1
  8. data/test/config/allinone.kubeconfig +3 -3
  9. data/test/config/external-ca.pem +14 -14
  10. data/test/config/external-cert.pem +17 -17
  11. data/test/config/external-key.rsa +25 -25
  12. data/test/json/config.istio.io_api_resource_list.json +679 -0
  13. data/test/json/created_security_context_constraint.json +65 -0
  14. data/test/json/pods_1.json +265 -0
  15. data/test/json/pods_2.json +102 -0
  16. data/test/json/pods_410.json +9 -0
  17. data/test/json/security.openshift.io_api_resource_list.json +69 -0
  18. data/test/json/security_context_constraint_list.json +375 -0
  19. data/test/test_common.rb +21 -2
  20. data/test/test_component_status.rb +1 -2
  21. data/test/test_config.rb +4 -4
  22. data/test/test_endpoint.rb +27 -8
  23. data/test/test_helper.rb +5 -0
  24. data/test/test_kubeclient.rb +4 -9
  25. data/test/test_limit_range.rb +1 -3
  26. data/test/test_missing_methods.rb +30 -4
  27. data/test/test_namespace.rb +3 -6
  28. data/test/test_node.rb +2 -4
  29. data/test/test_persistent_volume.rb +1 -2
  30. data/test/test_persistent_volume_claim.rb +1 -3
  31. data/test/test_pod.rb +54 -2
  32. data/test/test_replication_controller.rb +2 -7
  33. data/test/test_resource_quota.rb +1 -3
  34. data/test/test_secret.rb +3 -12
  35. data/test/test_security_context_constraint.rb +62 -0
  36. data/test/test_service.rb +10 -31
  37. data/test/test_service_account.rb +1 -3
  38. data/test/test_watch.rb +7 -16
  39. metadata +19 -3
@@ -0,0 +1,65 @@
1
+ {
2
+ "allowHostDirVolumePlugin": false,
3
+ "allowHostIPC": false,
4
+ "allowHostNetwork": false,
5
+ "allowHostPID": false,
6
+ "allowHostPorts": false,
7
+ "allowPrivilegedContainer": false,
8
+ "allowedCapabilities": null,
9
+ "allowedFlexVolumes": null,
10
+ "apiVersion": "security.openshift.io/v1",
11
+ "defaultAddCapabilities": null,
12
+ "fsGroup": {
13
+ "type": "RunAsAny"
14
+ },
15
+ "groups": [],
16
+ "kind": "SecurityContextConstraints",
17
+ "metadata": {
18
+ "creationTimestamp": "2018-11-23T10:01:42Z",
19
+ "name": "teleportation",
20
+ "resourceVersion": "5274",
21
+ "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints/teleportation",
22
+ "uid": "c6e8e2ec-ef06-11e8-b4c0-68f728fac3ab"
23
+ },
24
+ "priority": null,
25
+ "readOnlyRootFilesystem": false,
26
+ "requiredDropCapabilities": null,
27
+ "runAsUser": {
28
+ "type": "MustRunAs"
29
+ },
30
+ "seLinuxContext": {
31
+ "type": "MustRunAs"
32
+ },
33
+ "supplementalGroups": {
34
+ "type": "RunAsAny"
35
+ },
36
+ "users": [],
37
+ "volumes": [
38
+ "awsElasticBlockStore",
39
+ "azureDisk",
40
+ "azureFile",
41
+ "cephFS",
42
+ "cinder",
43
+ "configMap",
44
+ "downwardAPI",
45
+ "emptyDir",
46
+ "fc",
47
+ "flexVolume",
48
+ "flocker",
49
+ "gcePersistentDisk",
50
+ "gitRepo",
51
+ "glusterfs",
52
+ "iscsi",
53
+ "nfs",
54
+ "persistentVolumeClaim",
55
+ "photonPersistentDisk",
56
+ "portworxVolume",
57
+ "projected",
58
+ "quobyte",
59
+ "rbd",
60
+ "scaleIO",
61
+ "secret",
62
+ "storageOS",
63
+ "vsphere"
64
+ ]
65
+ }
@@ -0,0 +1,265 @@
1
+ {
2
+ "kind":"PodList",
3
+ "apiVersion":"v1",
4
+ "metadata":{
5
+ "selfLink":"/api/v1/pods",
6
+ "resourceVersion":"53225946",
7
+ "continue":"eyJ2IjoibWV0YS5rOHMua"
8
+ },
9
+ "items":[
10
+ {
11
+ "metadata":{
12
+ "name":"my-ruby-project-2-build",
13
+ "namespace":"my-project",
14
+ "selfLink":"/api/v1/namespaces/my-project/pods/my-ruby-project-2-build",
15
+ "uid":"0c478b50-babb-11e8-ba7e-d094660d31fb",
16
+ "resourceVersion":"42398462",
17
+ "creationTimestamp":"2018-09-17T20:48:36Z",
18
+ "deletionTimestamp":"2018-09-19T13:22:50Z",
19
+ "deletionGracePeriodSeconds":0,
20
+ "labels":{
21
+ "openshift.io/build.name":"my-ruby-project-2"
22
+ },
23
+ "annotations":{
24
+ "openshift.io/build.name":"my-ruby-project-2",
25
+ "openshift.io/scc":"privileged"
26
+ },
27
+ "ownerReferences":[
28
+ {
29
+ "apiVersion":"build.openshift.io/v1",
30
+ "kind":"Build",
31
+ "name":"my-ruby-project-2",
32
+ "uid":"0c450e6d-babb-11e8-ba7e-d094660d31fb",
33
+ "controller":true
34
+ }
35
+ ],
36
+ "finalizers":[
37
+ "foregroundDeletion"
38
+ ]
39
+ },
40
+ "spec":{
41
+ "volumes":[
42
+ {
43
+ "name":"buildworkdir",
44
+ "emptyDir":{
45
+
46
+ }
47
+ },
48
+ {
49
+ "name":"docker-socket",
50
+ "hostPath":{
51
+ "path":"/var/run/docker.sock",
52
+ "type":""
53
+ }
54
+ },
55
+ {
56
+ "name":"crio-socket",
57
+ "hostPath":{
58
+ "path":"/var/run/crio/crio.sock",
59
+ "type":""
60
+ }
61
+ },
62
+ {
63
+ "name":"builder-dockercfg-rjgnm-push",
64
+ "secret":{
65
+ "secretName":"builder-dockercfg-rjgnm",
66
+ "defaultMode":384
67
+ }
68
+ },
69
+ {
70
+ "name":"builder-token-zkpb6",
71
+ "secret":{
72
+ "secretName":"builder-token-zkpb6",
73
+ "defaultMode":420
74
+ }
75
+ }
76
+ ],
77
+ "containers":[
78
+ {
79
+ "name":"sti-build",
80
+ "image":"openshift3/ose-sti-builder:v3.9.25",
81
+ "command":[
82
+ "openshift-sti-build"
83
+ ]
84
+ }
85
+ ],
86
+ "restartPolicy":"Never",
87
+ "terminationGracePeriodSeconds":30,
88
+ "dnsPolicy":"ClusterFirst",
89
+ "nodeSelector":{
90
+ "node-role.kubernetes.io/compute":"true"
91
+ },
92
+ "serviceAccountName":"builder",
93
+ "serviceAccount":"builder",
94
+ "nodeName":"dell-r430-20.example.com",
95
+ "securityContext":{
96
+
97
+ },
98
+ "imagePullSecrets":[
99
+ {
100
+ "name":"builder-dockercfg-rjgnm"
101
+ }
102
+ ],
103
+ "schedulerName":"default-scheduler"
104
+ },
105
+ "status":{
106
+ "phase":"Failed",
107
+ "conditions":[
108
+ {
109
+ "type":"Initialized",
110
+ "status":"True",
111
+ "lastProbeTime":null,
112
+ "lastTransitionTime":"2018-09-17T20:48:49Z"
113
+ },
114
+ {
115
+ "type":"Ready",
116
+ "status":"False",
117
+ "lastProbeTime":null,
118
+ "lastTransitionTime":"2018-09-17T20:49:08Z",
119
+ "reason":"ContainersNotReady",
120
+ "message":"containers with unready status: [sti-build]"
121
+ },
122
+ {
123
+ "type":"PodScheduled",
124
+ "status":"True",
125
+ "lastProbeTime":null,
126
+ "lastTransitionTime":"2018-09-17T20:48:36Z"
127
+ }
128
+ ],
129
+ "hostIP":"10.8.96.55",
130
+ "podIP":"10.129.0.207",
131
+ "startTime":"2018-09-17T20:48:36Z",
132
+ "qosClass":"BestEffort"
133
+ }
134
+ },
135
+ {
136
+ "metadata":{
137
+ "name":"redis-1-94zxb",
138
+ "generateName":"redis-1-",
139
+ "namespace":"customer-logging",
140
+ "selfLink":"/api/v1/namespaces/customer-logging/pods/redis-1-94zxb",
141
+ "uid":"a8aea5f4-5f91-11e8-ba7e-d094660d31fb",
142
+ "resourceVersion":"47622190",
143
+ "creationTimestamp":"2018-05-24T20:33:03Z",
144
+ "labels":{
145
+ "app":"elastic-log-ripper",
146
+ "deployment":"redis-1",
147
+ "deploymentconfig":"redis",
148
+ "name":"redis"
149
+ },
150
+ "annotations":{
151
+ "openshift.io/deployment-config.latest-version":"1",
152
+ "openshift.io/deployment-config.name":"redis",
153
+ "openshift.io/deployment.name":"redis-1",
154
+ "openshift.io/generated-by":"OpenShiftNewApp",
155
+ "openshift.io/scc":"restricted"
156
+ },
157
+ "ownerReferences":[
158
+ {
159
+ "apiVersion":"v1",
160
+ "kind":"ReplicationController",
161
+ "name":"redis-1",
162
+ "uid":"9e2e46b3-5f91-11e8-ba7e-d094660d31fb",
163
+ "controller":true,
164
+ "blockOwnerDeletion":true
165
+ }
166
+ ]
167
+ },
168
+ "spec":{
169
+ "volumes":[
170
+ {
171
+ "name":"default-token-n2wzs",
172
+ "secret":{
173
+ "secretName":"default-token-n2wzs",
174
+ "defaultMode":420
175
+ }
176
+ }
177
+ ],
178
+ "containers":[
179
+ {
180
+ "name":"redis",
181
+ "image":"manageiq/redis:latest",
182
+ "ports":[
183
+ {
184
+ "containerPort":6379,
185
+ "protocol":"TCP"
186
+ }
187
+ ],
188
+ "resources":{
189
+
190
+ },
191
+ "volumeMounts":[
192
+ {
193
+ "name":"default-token-n2wzs",
194
+ "readOnly":true,
195
+ "mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"
196
+ }
197
+ ],
198
+ "terminationMessagePath":"/dev/termination-log",
199
+ "terminationMessagePolicy":"File",
200
+ "imagePullPolicy":"Always",
201
+ "securityContext":{
202
+ "capabilities":{
203
+ "drop":[
204
+ "KILL",
205
+ "MKNOD",
206
+ "SETGID",
207
+ "SETUID"
208
+ ]
209
+ },
210
+ "runAsUser":1000260000
211
+ }
212
+ }
213
+ ],
214
+ "restartPolicy":"Always",
215
+ "terminationGracePeriodSeconds":30,
216
+ "dnsPolicy":"ClusterFirst",
217
+ "nodeSelector":{
218
+ "node-role.kubernetes.io/compute":"true"
219
+ },
220
+ "serviceAccountName":"default",
221
+ "serviceAccount":"default",
222
+ "nodeName":"dell-r430-20.example.com",
223
+ "securityContext":{
224
+ "seLinuxOptions":{
225
+ "level":"s0:c16,c10"
226
+ },
227
+ "fsGroup":1000260000
228
+ },
229
+ "imagePullSecrets":[
230
+ {
231
+ "name":"default-dockercfg-ck286"
232
+ }
233
+ ],
234
+ "schedulerName":"default-scheduler"
235
+ },
236
+ "status":{
237
+ "phase":"Running",
238
+ "conditions":[
239
+ {
240
+ "type":"Initialized",
241
+ "status":"True",
242
+ "lastProbeTime":null,
243
+ "lastTransitionTime":"2018-05-24T20:33:04Z"
244
+ },
245
+ {
246
+ "type":"Ready",
247
+ "status":"True",
248
+ "lastProbeTime":null,
249
+ "lastTransitionTime":"2018-09-18T12:06:18Z"
250
+ },
251
+ {
252
+ "type":"PodScheduled",
253
+ "status":"True",
254
+ "lastProbeTime":null,
255
+ "lastTransitionTime":"2018-05-24T20:33:03Z"
256
+ }
257
+ ],
258
+ "hostIP":"10.8.96.55",
259
+ "podIP":"10.129.0.222",
260
+ "startTime":"2018-05-24T20:33:04Z",
261
+ "qosClass":"BestEffort"
262
+ }
263
+ }
264
+ ]
265
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "kind":"PodList",
3
+ "apiVersion":"v1",
4
+ "metadata":{
5
+ "selfLink":"/api/v1/pods",
6
+ "resourceVersion":"53226147"
7
+ },
8
+ "items":[
9
+ {
10
+ "metadata":{
11
+ "name":"topological-inventory-persister-9-hznds",
12
+ "generateName":"topological-inventory-persister-9-",
13
+ "namespace":"topological-inventory-ci",
14
+ "selfLink":"/api/v1/namespaces/topological-inventory-ci/pods/topological-inventory-persister-9-hznds",
15
+ "uid":"0c114dde-d865-11e8-ba7e-d094660d31fb",
16
+ "resourceVersion":"51987342",
17
+ "creationTimestamp":"2018-10-25T14:48:34Z",
18
+ "labels":{
19
+ "name":"topological-inventory-persister"
20
+ }
21
+ },
22
+ "spec":{
23
+ "volumes":[
24
+ {
25
+ "name":"default-token-5pdjl",
26
+ "secret":{
27
+ "secretName":"default-token-5pdjl",
28
+ "defaultMode":420
29
+ }
30
+ }
31
+ ],
32
+ "containers":[
33
+ {
34
+ "name":"topological-inventory-persister",
35
+ "image":"docker-registry.default.svc:5000/topological-inventory-ci/topological-inventory-persister@sha256:0f654ea09e749019cf3bcc4b8ee43b8dd813fcbf487843b917cf190213741927",
36
+ "resources":{
37
+ }
38
+ }
39
+ ],
40
+ "restartPolicy":"Always",
41
+ "terminationGracePeriodSeconds":30,
42
+ "dnsPolicy":"ClusterFirst",
43
+ "nodeSelector":{
44
+ "node-role.kubernetes.io/compute":"true"
45
+ },
46
+ "serviceAccountName":"default",
47
+ "serviceAccount":"default",
48
+ "nodeName":"dell-r430-20.example.com",
49
+ "schedulerName":"default-scheduler"
50
+ },
51
+ "status":{
52
+ "phase":"Running",
53
+ "hostIP":"10.8.96.55",
54
+ "podIP":"10.129.1.108",
55
+ "startTime":"2018-10-25T14:48:34Z",
56
+ "qosClass":"BestEffort"
57
+ }
58
+ },
59
+ {
60
+ "metadata":{
61
+ "name":"topological-inventory-persister-9-vzr6h",
62
+ "generateName":"topological-inventory-persister-9-",
63
+ "namespace":"topological-inventory-ci",
64
+ "selfLink":"/api/v1/namespaces/topological-inventory-ci/pods/topological-inventory-persister-9-vzr6h",
65
+ "uid":"3065d8ce-d86a-11e8-ba7e-d094660d31fb",
66
+ "resourceVersion":"51996115",
67
+ "creationTimestamp":"2018-10-25T15:25:22Z",
68
+ "labels":{
69
+ "name":"topological-inventory-persister"
70
+ }
71
+ },
72
+ "spec":{
73
+ "volumes":null,
74
+ "containers":[
75
+ {
76
+ "name":"topological-inventory-persister",
77
+ "image":"docker-registry.default.svc:5000/topological-inventory-ci/topological-inventory-persister@sha256:0f654ea09e749019cf3bcc4b8ee43b8dd813fcbf487843b917cf190213741927",
78
+ "resources":{
79
+ }
80
+ }
81
+ ],
82
+ "restartPolicy":"Always",
83
+ "terminationGracePeriodSeconds":30,
84
+ "dnsPolicy":"ClusterFirst",
85
+ "nodeSelector":{
86
+ "node-role.kubernetes.io/compute":"true"
87
+ },
88
+ "serviceAccountName":"default",
89
+ "serviceAccount":"default",
90
+ "nodeName":"dell-r430-20.example.com",
91
+ "schedulerName":"default-scheduler"
92
+ },
93
+ "status":{
94
+ "phase":"Running",
95
+ "hostIP":"10.8.96.55",
96
+ "podIP":"10.129.1.168",
97
+ "startTime":"2018-10-25T15:25:22Z",
98
+ "qosClass":"BestEffort"
99
+ }
100
+ }
101
+ ]
102
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "kind":"Status",
3
+ "apiVersion":"v1",
4
+ "metadata":{},
5
+ "status":"Failure",
6
+ "message":"The provided from parameter is too old to display a consistent list result. You must start a new list without the from.",
7
+ "reason":"Expired",
8
+ "code":410
9
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "kind": "APIResourceList",
3
+ "apiVersion": "v1",
4
+ "groupVersion": "security.openshift.io/v1",
5
+ "resources": [
6
+ {
7
+ "name": "podsecuritypolicyreviews",
8
+ "singularName": "",
9
+ "namespaced": true,
10
+ "kind": "PodSecurityPolicyReview",
11
+ "verbs": [
12
+ "create"
13
+ ]
14
+ },
15
+ {
16
+ "name": "podsecuritypolicyselfsubjectreviews",
17
+ "singularName": "",
18
+ "namespaced": true,
19
+ "kind": "PodSecurityPolicySelfSubjectReview",
20
+ "verbs": [
21
+ "create"
22
+ ]
23
+ },
24
+ {
25
+ "name": "podsecuritypolicysubjectreviews",
26
+ "singularName": "",
27
+ "namespaced": true,
28
+ "kind": "PodSecurityPolicySubjectReview",
29
+ "verbs": [
30
+ "create"
31
+ ]
32
+ },
33
+ {
34
+ "name": "rangeallocations",
35
+ "singularName": "",
36
+ "namespaced": false,
37
+ "kind": "RangeAllocation",
38
+ "verbs": [
39
+ "create",
40
+ "delete",
41
+ "deletecollection",
42
+ "get",
43
+ "list",
44
+ "patch",
45
+ "update",
46
+ "watch"
47
+ ]
48
+ },
49
+ {
50
+ "name": "securitycontextconstraints",
51
+ "singularName": "",
52
+ "namespaced": false,
53
+ "kind": "SecurityContextConstraints",
54
+ "verbs": [
55
+ "create",
56
+ "delete",
57
+ "deletecollection",
58
+ "get",
59
+ "list",
60
+ "patch",
61
+ "update",
62
+ "watch"
63
+ ],
64
+ "shortNames": [
65
+ "scc"
66
+ ]
67
+ }
68
+ ]
69
+ }