kubeclient 4.9.1 → 4.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/actions.yml +43 -0
  3. data/CHANGELOG.md +65 -0
  4. data/README.md +6 -0
  5. data/kubeclient.gemspec +7 -3
  6. data/lib/kubeclient/common.rb +31 -19
  7. data/lib/kubeclient/config.rb +22 -10
  8. data/lib/kubeclient/version.rb +1 -1
  9. data/lib/kubeclient/watch_stream.rb +1 -0
  10. metadata +40 -218
  11. data/.travis.yml +0 -29
  12. data/test/cassettes/kubernetes_guestbook.yml +0 -879
  13. data/test/config/allinone.kubeconfig +0 -20
  14. data/test/config/execauth.kubeconfig +0 -62
  15. data/test/config/external-ca.pem +0 -18
  16. data/test/config/external-cert.pem +0 -19
  17. data/test/config/external-key.rsa +0 -27
  18. data/test/config/external.kubeconfig +0 -20
  19. data/test/config/gcpauth.kubeconfig +0 -22
  20. data/test/config/gcpcmdauth.kubeconfig +0 -26
  21. data/test/config/nouser.kubeconfig +0 -16
  22. data/test/config/oidcauth.kubeconfig +0 -25
  23. data/test/config/timestamps.kubeconfig +0 -25
  24. data/test/config/userauth.kubeconfig +0 -28
  25. data/test/json/bindings_list.json +0 -10
  26. data/test/json/component_status.json +0 -17
  27. data/test/json/component_status_list.json +0 -52
  28. data/test/json/config.istio.io_api_resource_list.json +0 -679
  29. data/test/json/config_map_list.json +0 -9
  30. data/test/json/core_api_resource_list.json +0 -181
  31. data/test/json/core_api_resource_list_without_kind.json +0 -129
  32. data/test/json/core_oapi_resource_list_without_kind.json +0 -197
  33. data/test/json/created_endpoint.json +0 -28
  34. data/test/json/created_namespace.json +0 -20
  35. data/test/json/created_secret.json +0 -16
  36. data/test/json/created_security_context_constraint.json +0 -65
  37. data/test/json/created_service.json +0 -31
  38. data/test/json/empty_pod_list.json +0 -9
  39. data/test/json/endpoint_list.json +0 -48
  40. data/test/json/entity_list.json +0 -56
  41. data/test/json/event_list.json +0 -35
  42. data/test/json/extensions_v1beta1_api_resource_list.json +0 -217
  43. data/test/json/limit_range.json +0 -23
  44. data/test/json/limit_range_list.json +0 -31
  45. data/test/json/namespace.json +0 -13
  46. data/test/json/namespace_exception.json +0 -8
  47. data/test/json/namespace_list.json +0 -32
  48. data/test/json/node.json +0 -29
  49. data/test/json/node_list.json +0 -37
  50. data/test/json/node_notice.json +0 -160
  51. data/test/json/persistent_volume.json +0 -37
  52. data/test/json/persistent_volume_claim.json +0 -32
  53. data/test/json/persistent_volume_claim_list.json +0 -40
  54. data/test/json/persistent_volume_claims_nil_items.json +0 -8
  55. data/test/json/persistent_volume_list.json +0 -45
  56. data/test/json/pod.json +0 -92
  57. data/test/json/pod_list.json +0 -79
  58. data/test/json/pod_template_list.json +0 -9
  59. data/test/json/pods_1.json +0 -265
  60. data/test/json/pods_2.json +0 -102
  61. data/test/json/pods_410.json +0 -9
  62. data/test/json/processed_template.json +0 -27
  63. data/test/json/replication_controller.json +0 -57
  64. data/test/json/replication_controller_list.json +0 -66
  65. data/test/json/resource_quota.json +0 -46
  66. data/test/json/resource_quota_list.json +0 -54
  67. data/test/json/secret_list.json +0 -44
  68. data/test/json/security.openshift.io_api_resource_list.json +0 -69
  69. data/test/json/security_context_constraint_list.json +0 -375
  70. data/test/json/service.json +0 -33
  71. data/test/json/service_account.json +0 -25
  72. data/test/json/service_account_list.json +0 -82
  73. data/test/json/service_illegal_json_404.json +0 -1
  74. data/test/json/service_json_patch.json +0 -26
  75. data/test/json/service_list.json +0 -97
  76. data/test/json/service_merge_patch.json +0 -26
  77. data/test/json/service_patch.json +0 -25
  78. data/test/json/service_update.json +0 -22
  79. data/test/json/template.json +0 -27
  80. data/test/json/template.openshift.io_api_resource_list.json +0 -75
  81. data/test/json/template_list.json +0 -35
  82. data/test/json/versions_list.json +0 -6
  83. data/test/json/watch_stream.json +0 -3
  84. data/test/test_common.rb +0 -95
  85. data/test/test_common_url_handling.rb +0 -160
  86. data/test/test_component_status.rb +0 -29
  87. data/test/test_config.rb +0 -222
  88. data/test/test_endpoint.rb +0 -54
  89. data/test/test_exec_credentials.rb +0 -225
  90. data/test/test_gcp_command_credentials.rb +0 -27
  91. data/test/test_google_application_default_credentials.rb +0 -15
  92. data/test/test_guestbook_go.rb +0 -235
  93. data/test/test_helper.rb +0 -18
  94. data/test/test_kubeclient.rb +0 -881
  95. data/test/test_limit_range.rb +0 -25
  96. data/test/test_missing_methods.rb +0 -80
  97. data/test/test_namespace.rb +0 -59
  98. data/test/test_node.rb +0 -70
  99. data/test/test_oidc_auth_provider.rb +0 -103
  100. data/test/test_persistent_volume.rb +0 -29
  101. data/test/test_persistent_volume_claim.rb +0 -28
  102. data/test/test_pod.rb +0 -81
  103. data/test/test_pod_log.rb +0 -157
  104. data/test/test_process_template.rb +0 -80
  105. data/test/test_replication_controller.rb +0 -47
  106. data/test/test_resource_list_without_kind.rb +0 -78
  107. data/test/test_resource_quota.rb +0 -23
  108. data/test/test_secret.rb +0 -62
  109. data/test/test_security_context_constraint.rb +0 -62
  110. data/test/test_service.rb +0 -357
  111. data/test/test_service_account.rb +0 -26
  112. data/test/test_watch.rb +0 -195
  113. data/test/txt/pod_log.txt +0 -6
  114. data/test/valid_token_file +0 -1
@@ -1,48 +0,0 @@
1
- {
2
- "kind": "EndpointsList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/namespaces/endpoints",
6
- "resourceVersion": "39"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "example",
12
- "namespace": "default",
13
- "selfLink": "/api/v1/namespaces/default/endpoints/example",
14
- "uid": "db467530-b6aa-11e4-974a-525400c903c1",
15
- "resourceVersion": "38",
16
- "creationTimestamp": "2015-02-17T08:42:46-05:00"
17
- },
18
- "endpoints": [
19
- "172.17.0.63:80",
20
- "172.17.0.64:80"
21
- ]
22
- },
23
- {
24
- "metadata": {
25
- "name": "kubernetes",
26
- "namespace": "default",
27
- "selfLink": "/api/v1/namespaces/default/endpoints/kubernetes",
28
- "resourceVersion": "8",
29
- "creationTimestamp": null
30
- },
31
- "endpoints": [
32
- "192.168.122.4:6443"
33
- ]
34
- },
35
- {
36
- "metadata": {
37
- "name": "kubernetes-ro",
38
- "namespace": "default",
39
- "selfLink": "/api/v1/namespaces/default/endpoints/kubernetes-ro",
40
- "resourceVersion": "7",
41
- "creationTimestamp": null
42
- },
43
- "endpoints": [
44
- "192.168.122.4:7080"
45
- ]
46
- }
47
- ]
48
- }
@@ -1,56 +0,0 @@
1
- {
2
- "kind": "ServiceList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/services",
6
- "resourceVersion": "59"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "kubernetes",
12
- "namespace": "default",
13
- "selfLink": "/api/v1/services/kubernetes?namespace=default",
14
- "uid": "016e9dcd-ce39-11e4-ac24-3c970e4a436a",
15
- "resourceVersion": "6",
16
- "creationTimestamp": "2015-03-19T15:08:16+02:00",
17
- "labels": {
18
- "component": "apiserver",
19
- "provider": "kubernetes"
20
- }
21
- },
22
- "spec": {
23
- "port": 443,
24
- "protocol": "TCP",
25
- "selector": null,
26
- "clusterIP": "10.0.0.2",
27
- "containerPort": 0,
28
- "sessionAffinity": "None"
29
- },
30
- "status": {}
31
- },
32
- {
33
- "metadata": {
34
- "name": "kubernetes-ro",
35
- "namespace": "default",
36
- "selfLink": "/api/v1/services/kubernetes-ro?namespace=default",
37
- "uid": "015b78bf-ce39-11e4-ac24-3c970e4a436a",
38
- "resourceVersion": "5",
39
- "creationTimestamp": "2015-03-19T15:08:15+02:00",
40
- "labels": {
41
- "component": "apiserver",
42
- "provider": "kubernetes"
43
- }
44
- },
45
- "spec": {
46
- "port": 80,
47
- "protocol": "TCP",
48
- "selector": null,
49
- "clusterIP": "10.0.0.1",
50
- "containerPort": 0,
51
- "sessionAffinity": "None"
52
- },
53
- "status": {}
54
- }
55
- ]
56
- }
@@ -1,35 +0,0 @@
1
- {
2
- "kind": "EventList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/events",
6
- "resourceVersion": "152"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "php.13c130f78da4641e",
12
- "namespace": "default",
13
- "selfLink": "/api/v1/events/php.13c130f78da4641e?namespace=default",
14
- "uid": "f3a454d2-b03a-11e4-89e4-525400c903c1",
15
- "resourceVersion": "178",
16
- "creationTimestamp": "2015-02-09T04:06:37-05:00"
17
- },
18
- "involvedObject": {
19
- "kind": "BoundPod",
20
- "namespace": "default",
21
- "name": "php",
22
- "uid": "64273d20-b03a-11e4-89e4-525400c903c1",
23
- "apiVersion": "v1beta1",
24
- "fieldPath": "spec.containers{nginx}"
25
- },
26
- "reason": "created",
27
- "message": "Created with docker id 9ba2a714411d2d0dd1e826b2fe5c3222b5cbfd9dd9133c841585cbb96b8c2c0f",
28
- "source": {
29
- "component": "kubelet",
30
- "host": "127.0.0.1"
31
- },
32
- "timestamp": "2015-02-09T04:06:37-05:00"
33
- }
34
- ]
35
- }
@@ -1,217 +0,0 @@
1
- {
2
- "kind": "APIResourceList",
3
- "groupVersion": "extensions/v1beta1",
4
- "resources": [
5
- {
6
- "name": "daemonsets",
7
- "singularName": "",
8
- "namespaced": true,
9
- "kind": "DaemonSet",
10
- "verbs": [
11
- "create",
12
- "delete",
13
- "deletecollection",
14
- "get",
15
- "list",
16
- "patch",
17
- "update",
18
- "watch"
19
- ],
20
- "shortNames": [
21
- "ds"
22
- ]
23
- },
24
- {
25
- "name": "daemonsets/status",
26
- "singularName": "",
27
- "namespaced": true,
28
- "kind": "DaemonSet",
29
- "verbs": [
30
- "get",
31
- "patch",
32
- "update"
33
- ]
34
- },
35
- {
36
- "name": "deployments",
37
- "singularName": "",
38
- "namespaced": true,
39
- "kind": "Deployment",
40
- "verbs": [
41
- "create",
42
- "delete",
43
- "deletecollection",
44
- "get",
45
- "list",
46
- "patch",
47
- "update",
48
- "watch"
49
- ],
50
- "shortNames": [
51
- "deploy"
52
- ]
53
- },
54
- {
55
- "name": "deployments/rollback",
56
- "singularName": "",
57
- "namespaced": true,
58
- "kind": "DeploymentRollback",
59
- "verbs": [
60
- "create"
61
- ]
62
- },
63
- {
64
- "name": "deployments/scale",
65
- "singularName": "",
66
- "namespaced": true,
67
- "group": "extensions",
68
- "version": "v1beta1",
69
- "kind": "Scale",
70
- "verbs": [
71
- "get",
72
- "patch",
73
- "update"
74
- ]
75
- },
76
- {
77
- "name": "deployments/status",
78
- "singularName": "",
79
- "namespaced": true,
80
- "kind": "Deployment",
81
- "verbs": [
82
- "get",
83
- "patch",
84
- "update"
85
- ]
86
- },
87
- {
88
- "name": "ingresses",
89
- "singularName": "",
90
- "namespaced": true,
91
- "kind": "Ingress",
92
- "verbs": [
93
- "create",
94
- "delete",
95
- "deletecollection",
96
- "get",
97
- "list",
98
- "patch",
99
- "update",
100
- "watch"
101
- ],
102
- "shortNames": [
103
- "ing"
104
- ]
105
- },
106
- {
107
- "name": "ingresses/status",
108
- "singularName": "",
109
- "namespaced": true,
110
- "kind": "Ingress",
111
- "verbs": [
112
- "get",
113
- "patch",
114
- "update"
115
- ]
116
- },
117
- {
118
- "name": "networkpolicies",
119
- "singularName": "",
120
- "namespaced": true,
121
- "kind": "NetworkPolicy",
122
- "verbs": [
123
- "create",
124
- "delete",
125
- "deletecollection",
126
- "get",
127
- "list",
128
- "patch",
129
- "update",
130
- "watch"
131
- ],
132
- "shortNames": [
133
- "netpol"
134
- ]
135
- },
136
- {
137
- "name": "podsecuritypolicies",
138
- "singularName": "",
139
- "namespaced": false,
140
- "kind": "PodSecurityPolicy",
141
- "verbs": [
142
- "create",
143
- "delete",
144
- "deletecollection",
145
- "get",
146
- "list",
147
- "patch",
148
- "update",
149
- "watch"
150
- ],
151
- "shortNames": [
152
- "psp"
153
- ]
154
- },
155
- {
156
- "name": "replicasets",
157
- "singularName": "",
158
- "namespaced": true,
159
- "kind": "ReplicaSet",
160
- "verbs": [
161
- "create",
162
- "delete",
163
- "deletecollection",
164
- "get",
165
- "list",
166
- "patch",
167
- "update",
168
- "watch"
169
- ],
170
- "shortNames": [
171
- "rs"
172
- ]
173
- },
174
- {
175
- "name": "replicasets/scale",
176
- "singularName": "",
177
- "namespaced": true,
178
- "group": "extensions",
179
- "version": "v1beta1",
180
- "kind": "Scale",
181
- "verbs": [
182
- "get",
183
- "patch",
184
- "update"
185
- ]
186
- },
187
- {
188
- "name": "replicasets/status",
189
- "singularName": "",
190
- "namespaced": true,
191
- "kind": "ReplicaSet",
192
- "verbs": [
193
- "get",
194
- "patch",
195
- "update"
196
- ]
197
- },
198
- {
199
- "name": "replicationcontrollers",
200
- "singularName": "",
201
- "namespaced": true,
202
- "kind": "ReplicationControllerDummy",
203
- "verbs": []
204
- },
205
- {
206
- "name": "replicationcontrollers/scale",
207
- "singularName": "",
208
- "namespaced": true,
209
- "kind": "Scale",
210
- "verbs": [
211
- "get",
212
- "patch",
213
- "update"
214
- ]
215
- }
216
- ]
217
- }
@@ -1,23 +0,0 @@
1
- {
2
- "kind": "LimitRange",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "name": "limits",
6
- "namespace": "quota-example",
7
- "selfLink": "/api/v1/namespaces/quota-example/limitranges/limits",
8
- "uid": "7a76a44c-3e9d-11e5-8214-0aaeec44370e",
9
- "resourceVersion": "103384",
10
- "creationTimestamp": "2015-08-09T13:49:39Z"
11
- },
12
- "spec": {
13
- "limits": [
14
- {
15
- "type": "Container",
16
- "default": {
17
- "cpu": "100m",
18
- "memory": "512Mi"
19
- }
20
- }
21
- ]
22
- }
23
- }
@@ -1,31 +0,0 @@
1
- {
2
- "kind": "LimitRangeList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/namespaces/quota-example/limitranges/",
6
- "resourceVersion": "103421"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "limits",
12
- "namespace": "quota-example",
13
- "selfLink": "/api/v1/namespaces/quota-example/limitranges/limits",
14
- "uid": "7a76a44c-3e9d-11e5-8214-0aaeec44370e",
15
- "resourceVersion": "103384",
16
- "creationTimestamp": "2015-08-09T13:49:39Z"
17
- },
18
- "spec": {
19
- "limits": [
20
- {
21
- "type": "Container",
22
- "default": {
23
- "cpu": "100m",
24
- "memory": "512Mi"
25
- }
26
- }
27
- ]
28
- }
29
- }
30
- ]
31
- }
@@ -1,13 +0,0 @@
1
- {
2
- "kind": "Namespace",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "name": "staging",
6
- "selfLink": "/api/v1/namespaces/staging",
7
- "uid": "e388bc10-c021-11e4-a514-3c970e4a436a",
8
- "resourceVersion": "1168",
9
- "creationTimestamp": "2015-03-01T16:47:31+02:00"
10
- },
11
- "spec": {},
12
- "status": {}
13
- }
@@ -1,8 +0,0 @@
1
- {
2
- "kind": "Status",
3
- "apiVersion": "v1",
4
- "metadata": {},
5
- "status": "Failure",
6
- "message": "converting to : type names don't match (Pod, Namespace)",
7
- "code": 500
8
- }
@@ -1,32 +0,0 @@
1
- {
2
- "kind": "NamespaceList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/namespaces",
6
- "resourceVersion": "1707"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "default",
12
- "selfLink": "/api/v1/namespaces/default",
13
- "uid": "56c3eb7c-c009-11e4-a514-3c970e4a436a",
14
- "resourceVersion": "4",
15
- "creationTimestamp": "2015-03-01T13:51:47+02:00"
16
- },
17
- "spec": {},
18
- "status": {}
19
- },
20
- {
21
- "metadata": {
22
- "name": "staging",
23
- "selfLink": "/api/v1/namespaces/staging",
24
- "uid": "e388bc10-c021-11e4-a514-3c970e4a436a",
25
- "resourceVersion": "1168",
26
- "creationTimestamp": "2015-03-01T16:47:31+02:00"
27
- },
28
- "spec": {},
29
- "status": {}
30
- }
31
- ]
32
- }
data/test/json/node.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "kind": "Node",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "name": "127.0.0.1",
6
- "selfLink": "/api/v1/nodes/127.0.0.1",
7
- "uid": "041143c5-ce39-11e4-ac24-3c970e4a436a",
8
- "resourceVersion": "1724",
9
- "creationTimestamp": "2015-03-19T15:08:20+02:00"
10
- },
11
- "spec": {
12
- "capacity": {
13
- "cpu": "1",
14
- "memory": "3Gi"
15
- }
16
- },
17
- "status": {
18
- "hostIP": "127.0.0.1",
19
- "conditions": [
20
- {
21
- "kind": "Ready",
22
- "status": "None",
23
- "lastProbeTime": "2015-03-20T14:16:52+02:00",
24
- "lastTransitionTime": "2015-03-19T15:08:20+02:00",
25
- "reason": "Node health check failed: kubelet /healthz endpoint returns not ok"
26
- }
27
- ]
28
- }
29
- }
@@ -1,37 +0,0 @@
1
- {
2
- "kind": "NodeList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/nodes",
6
- "resourceVersion": "137"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "127.0.0.1",
12
- "selfLink": "/api/v1/nodes/127.0.0.1",
13
- "uid": "041143c5-ce39-11e4-ac24-3c970e4a436a",
14
- "resourceVersion": "137",
15
- "creationTimestamp": "2015-03-19T15:08:20+02:00"
16
- },
17
- "spec": {
18
- "capacity": {
19
- "cpu": "1",
20
- "memory": "3Gi"
21
- }
22
- },
23
- "status": {
24
- "hostIP": "127.0.0.1",
25
- "conditions": [
26
- {
27
- "kind": "Ready",
28
- "status": "None",
29
- "lastProbeTime": "2015-03-19T15:29:33+02:00",
30
- "lastTransitionTime": "2015-03-19T15:08:20+02:00",
31
- "reason": "Node health check failed: kubelet /healthz endpoint returns not ok"
32
- }
33
- ]
34
- }
35
- }
36
- ]
37
- }