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,160 +0,0 @@
1
- {
2
- "type": "ADDED",
3
- "object": {
4
- "apiVersion": "v1",
5
- "kind": "Node",
6
- "metadata": {
7
- "annotations": {
8
- "volumes.kubernetes.io/controller-managed-attach-detach": "true"
9
- },
10
- "creationTimestamp": "2017-12-11T12:00:13Z",
11
- "labels": {
12
- "beta.kubernetes.io/arch": "amd64",
13
- "beta.kubernetes.io/os": "linux",
14
- "kubernetes.io/hostname": "openshift.local",
15
- "openshift-infra": "apiserver"
16
- },
17
- "name": "openshift.local",
18
- "resourceVersion": "367410",
19
- "selfLink": "/api/v1/nodes/openshift.local",
20
- "uid": "d88c7af6-de6a-11e7-8725-52540080f1d2"
21
- },
22
- "spec": {
23
- "externalID": "openshift.local"
24
- },
25
- "status": {
26
- "addresses": [
27
- {
28
- "address": "192.168.122.40",
29
- "type": "InternalIP"
30
- },
31
- {
32
- "address": "openshift.local",
33
- "type": "Hostname"
34
- }
35
- ],
36
- "allocatable": {
37
- "cpu": "2",
38
- "memory": "8072896Ki",
39
- "pods": "20"
40
- },
41
- "capacity": {
42
- "cpu": "2",
43
- "memory": "8175296Ki",
44
- "pods": "20"
45
- },
46
- "conditions": [
47
- {
48
- "lastHeartbeatTime": "2017-12-15T00:36:13Z",
49
- "lastTransitionTime": "2017-12-11T12:00:13Z",
50
- "message": "kubelet has sufficient disk space available",
51
- "reason": "KubeletHasSufficientDisk",
52
- "status": "False",
53
- "type": "OutOfDisk"
54
- },
55
- {
56
- "lastHeartbeatTime": "2017-12-15T00:36:13Z",
57
- "lastTransitionTime": "2017-12-11T12:00:13Z",
58
- "message": "kubelet has sufficient memory available",
59
- "reason": "KubeletHasSufficientMemory",
60
- "status": "False",
61
- "type": "MemoryPressure"
62
- },
63
- {
64
- "lastHeartbeatTime": "2017-12-15T00:36:13Z",
65
- "lastTransitionTime": "2017-12-11T12:00:13Z",
66
- "message": "kubelet has no disk pressure",
67
- "reason": "KubeletHasNoDiskPressure",
68
- "status": "False",
69
- "type": "DiskPressure"
70
- },
71
- {
72
- "lastHeartbeatTime": "2017-12-15T00:36:13Z",
73
- "lastTransitionTime": "2017-12-14T15:43:39Z",
74
- "message": "kubelet is posting ready status",
75
- "reason": "KubeletReady",
76
- "status": "True",
77
- "type": "Ready"
78
- }
79
- ],
80
- "daemonEndpoints": {
81
- "kubeletEndpoint": {
82
- "Port": 10250
83
- }
84
- },
85
- "images": [
86
- {
87
- "names": [
88
- "docker.io/openshift/origin@sha256:908c6c9ccf0e0feefe2658899656c6e73d2854777fa340738fb903f0a40c328d",
89
- "docker.io/openshift/origin:latest"
90
- ],
91
- "sizeBytes": 1222636603
92
- },
93
- {
94
- "names": [
95
- "docker.io/openshift/origin-deployer@sha256:3d324bce1870047edc418041cefdec88e0a5bbb5b3b9f6fd35b43f14919a656c",
96
- "docker.io/openshift/origin-deployer:v3.7.0"
97
- ],
98
- "sizeBytes": 1098951248
99
- },
100
- {
101
- "names": [
102
- "docker.io/cockpit/kubernetes@sha256:a8e58cd5e6f5a4d12d1e2dfd339686b74f3c22586952ca7aa184dc254ab49714",
103
- "docker.io/cockpit/kubernetes:latest"
104
- ],
105
- "sizeBytes": 375926556
106
- },
107
- {
108
- "names": [
109
- "docker.io/cockpit/kubernetes@sha256:0745b3823efc57e03a5ef378614dfcb6c2b1e3964220bbf908fb3046a91cef70"
110
- ],
111
- "sizeBytes": 350062743
112
- },
113
- {
114
- "names": [
115
- "docker.io/openshift/origin-service-catalog@sha256:ef851e06276af96838a93320d0e4be51cc8de6e5afb2fb0efd4e56cec114b937"
116
- ],
117
- "sizeBytes": 284732029
118
- },
119
- {
120
- "names": [
121
- "docker.io/openshift/origin-service-catalog@sha256:8addfd742d92d8da819b091d6bda40edc45e88d1446ffd1ad658b6d21b3c36fd"
122
- ],
123
- "sizeBytes": 284731998
124
- },
125
- {
126
- "names": [
127
- "docker.io/openshift/origin-service-catalog@sha256:b3a737cc346b3cae85ef2f5d020b607781a1cac38fe70678cb78fee2c2a3bf8a"
128
- ],
129
- "sizeBytes": 284731943
130
- },
131
- {
132
- "names": [
133
- "docker.io/openshift/origin-service-catalog@sha256:957934537721da33362693d4f1590dc79dc5da7438799bf14d645165768e53ef",
134
- "docker.io/openshift/origin-service-catalog:latest"
135
- ],
136
- "sizeBytes": 283929631
137
- },
138
- {
139
- "names": [
140
- "docker.io/openshift/origin-pod@sha256:2c257d83a01607b229ef5e3dca09f52c3a2a2788c09dc33f0444ec4e572a9e1d",
141
- "docker.io/openshift/origin-pod:v3.7.0"
142
- ],
143
- "sizeBytes": 218423400
144
- }
145
- ],
146
- "nodeInfo": {
147
- "architecture": "amd64",
148
- "bootID": "75be791d-88a2-4f56-a588-c071a80bf7cf",
149
- "containerRuntimeVersion": "docker://1.12.6",
150
- "kernelVersion": "3.10.0-693.11.1.el7.x86_64",
151
- "kubeProxyVersion": "v1.7.6+a08f5eeb62",
152
- "kubeletVersion": "v1.7.6+a08f5eeb62",
153
- "machineID": "adf09ffc2de2624aa5ed335727c7400d",
154
- "operatingSystem": "linux",
155
- "osImage": "CentOS Linux 7 (Core)",
156
- "systemUUID": "FC9FF0AD-E22D-4A62-A5ED-335727C7400D"
157
- }
158
- }
159
- }
160
- }
@@ -1,37 +0,0 @@
1
- {
2
- "kind": "PersistentVolume",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "name": "pv0001",
6
- "selfLink": "/api/v1/persistentvolumes/pv0001",
7
- "uid": "c83eece1-4b38-11e5-8d27-28d2447dcefe",
8
- "resourceVersion": "1585",
9
- "creationTimestamp": "2015-08-25T14:51:35Z",
10
- "labels": {
11
- "type": "local"
12
- }
13
- },
14
- "spec": {
15
- "capacity": {
16
- "storage": "10Gi"
17
- },
18
- "hostPath": {
19
- "path": "/tmp/data01"
20
- },
21
- "accessModes": [
22
- "ReadWriteOnce"
23
- ],
24
- "claimRef": {
25
- "kind": "PersistentVolumeClaim",
26
- "namespace": "default",
27
- "name": "myclaim-1",
28
- "uid": "d47384a3-4b38-11e5-8d27-28d2447dcefe",
29
- "apiVersion": "v1",
30
- "resourceVersion": "1582"
31
- },
32
- "persistentVolumeReclaimPolicy": "Retain"
33
- },
34
- "status": {
35
- "phase": "Bound"
36
- }
37
- }
@@ -1,32 +0,0 @@
1
- {
2
- "kind": "PersistentVolumeClaim",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "name": "myclaim-1",
6
- "namespace": "default",
7
- "selfLink": "/api/v1/namespaces/default/persistentvolumeclaims/myclaim-1",
8
- "uid": "d47384a3-4b38-11e5-8d27-28d2447dcefe",
9
- "resourceVersion": "1584",
10
- "creationTimestamp": "2015-08-25T14:51:55Z"
11
- },
12
- "spec": {
13
- "accessModes": [
14
- "ReadWriteOnce"
15
- ],
16
- "resources": {
17
- "requests": {
18
- "storage": "3Gi"
19
- }
20
- },
21
- "volumeName": "pv0001"
22
- },
23
- "status": {
24
- "phase": "Bound",
25
- "accessModes": [
26
- "ReadWriteOnce"
27
- ],
28
- "capacity": {
29
- "storage": "10Gi"
30
- }
31
- }
32
- }
@@ -1,40 +0,0 @@
1
- {
2
- "kind": "PersistentVolumeClaimList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/persistentvolumeclaims",
6
- "resourceVersion": "3188"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "myclaim-1",
12
- "namespace": "default",
13
- "selfLink": "/api/v1/namespaces/default/persistentvolumeclaims/myclaim-1",
14
- "uid": "d47384a3-4b38-11e5-8d27-28d2447dcefe",
15
- "resourceVersion": "1584",
16
- "creationTimestamp": "2015-08-25T14:51:55Z"
17
- },
18
- "spec": {
19
- "accessModes": [
20
- "ReadWriteOnce"
21
- ],
22
- "resources": {
23
- "requests": {
24
- "storage": "3Gi"
25
- }
26
- },
27
- "volumeName": "pv0001"
28
- },
29
- "status": {
30
- "phase": "Bound",
31
- "accessModes": [
32
- "ReadWriteOnce"
33
- ],
34
- "capacity": {
35
- "storage": "10Gi"
36
- }
37
- }
38
- }
39
- ]
40
- }
@@ -1,8 +0,0 @@
1
- {
2
- "kind": "PersistentVolumeClaimList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/persistentvolumeclaims",
6
- "resourceVersion": "1089012"
7
- }
8
- }
@@ -1,45 +0,0 @@
1
- {
2
- "kind": "PersistentVolumeList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/persistentvolumes",
6
- "resourceVersion": "2999"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "pv0001",
12
- "selfLink": "/api/v1/persistentvolumes/pv0001",
13
- "uid": "c83eece1-4b38-11e5-8d27-28d2447dcefe",
14
- "resourceVersion": "1585",
15
- "creationTimestamp": "2015-08-25T14:51:35Z",
16
- "labels": {
17
- "type": "local"
18
- }
19
- },
20
- "spec": {
21
- "capacity": {
22
- "storage": "10Gi"
23
- },
24
- "hostPath": {
25
- "path": "/tmp/data01"
26
- },
27
- "accessModes": [
28
- "ReadWriteOnce"
29
- ],
30
- "claimRef": {
31
- "kind": "PersistentVolumeClaim",
32
- "namespace": "default",
33
- "name": "myclaim-1",
34
- "uid": "d47384a3-4b38-11e5-8d27-28d2447dcefe",
35
- "apiVersion": "v1",
36
- "resourceVersion": "1582"
37
- },
38
- "persistentVolumeReclaimPolicy": "Retain"
39
- },
40
- "status": {
41
- "phase": "Bound"
42
- }
43
- }
44
- ]
45
- }
data/test/json/pod.json DELETED
@@ -1,92 +0,0 @@
1
- {
2
- "kind": "Pod",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "name": "redis-master3",
6
- "namespace": "default",
7
- "selfLink": "/api/v1/pods/redis-master3?namespace=default",
8
- "uid": "a344023f-a23c-11e4-a36b-3c970e4a436a",
9
- "resourceVersion": "9",
10
- "creationTimestamp": "2015-01-22T15:43:24+02:00",
11
- "labels": {
12
- "name": "redis-master"
13
- }
14
- },
15
- "spec": {
16
- "volumes": null,
17
- "containers": [
18
- {
19
- "name": "master",
20
- "image": "dockerfile/redis",
21
- "ports": [
22
- {
23
- "hostPort": 6379,
24
- "containerPort": 6379,
25
- "protocol": "TCP"
26
- }
27
- ],
28
- "memory": "0",
29
- "cpu": "100m",
30
- "imagePullPolicy": ""
31
- },
32
- {
33
- "name": "php-redis",
34
- "image": "kubernetes/example-guestbook-php-redis",
35
- "ports": [
36
- {
37
- "hostPort": 8000,
38
- "containerPort": 80,
39
- "protocol": "TCP"
40
- }
41
- ],
42
- "memory": "50000000",
43
- "cpu": "100m",
44
- "imagePullPolicy": ""
45
- }
46
- ],
47
- "restartPolicy": {
48
- "always": {
49
-
50
- }
51
- },
52
- "dnsPolicy": "ClusterFirst"
53
- },
54
- "status": {
55
- "phase": "Running",
56
- "host": "127.0.0.1",
57
- "podIP": "172.17.0.2",
58
- "info": {
59
- "master": {
60
- "state": {
61
- "running": {
62
- "startedAt": "2015-01-22T13:43:29Z"
63
- }
64
- },
65
- "restartCount": 0,
66
- "containerID": "docker://87458d9a12f9dc9a01b52c1eee5f09cf48939380271c0eaf31af298ce67b125e",
67
- "image": "dockerfile/redis"
68
- },
69
- "net": {
70
- "state": {
71
- "running": {
72
- "startedAt": "2015-01-22T13:43:27Z"
73
- }
74
- },
75
- "restartCount": 0,
76
- "containerID": "docker://3bb5ced1f831322d370f70b58137e1dd41216c2960b7a99394542b5230cbd259",
77
- "podIP": "172.17.0.2",
78
- "image": "kubernetes/pause:latest"
79
- },
80
- "php-redis": {
81
- "state": {
82
- "running": {
83
- "startedAt": "2015-01-22T13:43:31Z"
84
- }
85
- },
86
- "restartCount": 0,
87
- "containerID": "docker://5f08685c0a7a5c974d438a52c6560d72bb0aae7e805d2a34302b9b460f1297c7",
88
- "image": "kubernetes/example-guestbook-php-redis"
89
- }
90
- }
91
- }
92
- }
@@ -1,79 +0,0 @@
1
- {
2
- "kind": "PodList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/pods",
6
- "resourceVersion": "1315"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "redis-master3",
12
- "namespace": "default",
13
- "selfLink": "/api/v1/pods/redis-master3?namespace=default",
14
- "uid": "1da148b4-cef5-11e4-ac24-3c970e4a436a",
15
- "resourceVersion": "1301",
16
- "creationTimestamp": "2015-03-20T13:34:48+02:00",
17
- "labels": {
18
- "mylabel": "mylabelvalue",
19
- "role": "pod"
20
- }
21
- },
22
- "spec": {
23
- "volumes": null,
24
- "containers": [
25
- {
26
- "name": "master",
27
- "image": "dockerfile/redis",
28
- "ports": [
29
- {
30
- "hostPort": 6379,
31
- "containerPort": 6379,
32
- "protocol": "TCP"
33
- }
34
- ],
35
- "resources": {
36
- "limits": {
37
- "cpu": "100m"
38
- }
39
- },
40
- "terminationMessagePath": "/dev/termination-log",
41
- "imagePullPolicy": "IfNotPresent",
42
- "securityContext": {
43
- "capabilities": {}
44
- }
45
- },
46
- {
47
- "name": "php-redis",
48
- "image": "kubernetes/example-guestbook-php-redis",
49
- "ports": [
50
- {
51
- "hostPort": 8000,
52
- "containerPort": 80,
53
- "protocol": "TCP"
54
- }
55
- ],
56
- "resources": {
57
- "limits": {
58
- "cpu": "100m",
59
- "memory": "50000000"
60
- }
61
- },
62
- "terminationMessagePath": "/dev/termination-log",
63
- "imagePullPolicy": "IfNotPresent",
64
- "securityContext": {
65
- "capabilities": {}
66
- }
67
- }
68
- ],
69
- "restartPolicy": {
70
- "always": {}
71
- },
72
- "dnsPolicy": "ClusterFirst"
73
- },
74
- "status": {
75
- "phase": "Pending"
76
- }
77
- }
78
- ]
79
- }
@@ -1,9 +0,0 @@
1
- {
2
- "kind": "PodTemplateList",
3
- "apiVersion": "v1",
4
- "metadata": {
5
- "selfLink": "/api/v1/podtemplates",
6
- "resourceVersion": "672"
7
- },
8
- "items": []
9
- }