kubeclient 0.3.0 → 4.9.2

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.

Files changed (63) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/actions.yml +35 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +29 -0
  5. data/CHANGELOG.md +208 -0
  6. data/Gemfile +3 -0
  7. data/README.md +706 -57
  8. data/RELEASING.md +69 -0
  9. data/Rakefile +3 -5
  10. data/kubeclient.gemspec +19 -11
  11. data/lib/kubeclient/aws_eks_credentials.rb +46 -0
  12. data/lib/kubeclient/common.rb +597 -161
  13. data/lib/kubeclient/config.rb +195 -0
  14. data/lib/kubeclient/entity_list.rb +7 -2
  15. data/lib/kubeclient/exec_credentials.rb +89 -0
  16. data/lib/kubeclient/gcp_auth_provider.rb +19 -0
  17. data/lib/kubeclient/gcp_command_credentials.rb +31 -0
  18. data/lib/kubeclient/google_application_default_credentials.rb +31 -0
  19. data/lib/kubeclient/http_error.rb +25 -0
  20. data/lib/kubeclient/missing_kind_compatibility.rb +68 -0
  21. data/lib/kubeclient/oidc_auth_provider.rb +52 -0
  22. data/lib/kubeclient/resource.rb +11 -0
  23. data/lib/kubeclient/resource_not_found_error.rb +4 -0
  24. data/lib/kubeclient/version.rb +1 -1
  25. data/lib/kubeclient/watch_stream.rb +71 -28
  26. data/lib/kubeclient.rb +25 -82
  27. metadata +140 -114
  28. data/.travis.yml +0 -6
  29. data/lib/kubeclient/kube_exception.rb +0 -13
  30. data/lib/kubeclient/watch_notice.rb +0 -7
  31. data/test/json/created_namespace_b3.json +0 -20
  32. data/test/json/created_secret.json +0 -16
  33. data/test/json/created_service_b3.json +0 -31
  34. data/test/json/empty_pod_list_b3.json +0 -9
  35. data/test/json/endpoint_list_b3.json +0 -48
  36. data/test/json/entity_list_b3.json +0 -56
  37. data/test/json/event_list_b3.json +0 -35
  38. data/test/json/namespace_b3.json +0 -13
  39. data/test/json/namespace_exception_b3.json +0 -8
  40. data/test/json/namespace_list_b3.json +0 -32
  41. data/test/json/node_b3.json +0 -29
  42. data/test/json/node_list_b3.json +0 -37
  43. data/test/json/pod_b3.json +0 -92
  44. data/test/json/pod_list_b3.json +0 -75
  45. data/test/json/replication_controller_b3.json +0 -57
  46. data/test/json/replication_controller_list_b3.json +0 -64
  47. data/test/json/secret_list_b3.json +0 -44
  48. data/test/json/service_b3.json +0 -33
  49. data/test/json/service_illegal_json_404.json +0 -1
  50. data/test/json/service_list_b3.json +0 -97
  51. data/test/json/service_update_b3.json +0 -22
  52. data/test/json/versions_list.json +0 -6
  53. data/test/json/watch_stream_b3.json +0 -3
  54. data/test/test_helper.rb +0 -4
  55. data/test/test_kubeclient.rb +0 -407
  56. data/test/test_namespace.rb +0 -53
  57. data/test/test_node.rb +0 -25
  58. data/test/test_pod.rb +0 -21
  59. data/test/test_replication_controller.rb +0 -24
  60. data/test/test_secret.rb +0 -58
  61. data/test/test_service.rb +0 -136
  62. data/test/test_watch.rb +0 -37
  63. data/test/valid_token_file +0 -1
@@ -1,53 +1,96 @@
1
1
  require 'json'
2
- require 'net/http'
2
+ require 'http'
3
3
  module Kubeclient
4
4
  module Common
5
5
  # HTTP Stream used to watch changes on entities
6
6
  class WatchStream
7
- def initialize(uri, options)
7
+ def initialize(uri, http_options, formatter:)
8
8
  @uri = uri
9
- @http = nil
10
- @options = options.merge(read_timeout: nil)
9
+ @http_client = nil
10
+ @http_options = http_options
11
+ @http_options[:http_max_redirects] ||= Kubeclient::Client::DEFAULT_HTTP_MAX_REDIRECTS
12
+ @formatter = formatter
11
13
  end
12
14
 
13
15
  def each
14
16
  @finished = false
15
- @http = Net::HTTP.start(@uri.host, @uri.port, @options)
16
17
 
17
- buffer = ''
18
- request = generate_request
18
+ @http_client = build_client
19
+ response = @http_client.request(:get, @uri, build_client_options)
20
+ unless response.code < 300
21
+ raise Kubeclient::HttpError.new(response.code, response.reason, response)
22
+ end
19
23
 
20
- @http.request(request) do |response|
21
- unless response.is_a? Net::HTTPSuccess
22
- fail KubeException.new(response.code, response.message)
23
- end
24
- response.read_body do |chunk|
25
- buffer << chunk
26
- while (line = buffer.slice!(/.+\n/))
27
- yield WatchNotice.new(JSON.parse(line))
28
- end
24
+ buffer = ''
25
+ response.body.each do |chunk|
26
+ buffer << chunk
27
+ while (line = buffer.slice!(/.+\n/))
28
+ yield @formatter.call(line.chomp)
29
29
  end
30
30
  end
31
- rescue Errno::EBADF
31
+ rescue StandardError
32
32
  raise unless @finished
33
33
  end
34
34
 
35
- def generate_request
36
- request = Net::HTTP::Get.new(@uri)
37
- if @options[:basic_auth_user] && @options[:basic_auth_password]
38
- request.basic_auth @options[:basic_auth_user],
39
- @options[:basic_auth_password]
35
+ def finish
36
+ @finished = true
37
+ @http_client.close unless @http_client.nil?
38
+ end
39
+
40
+ private
41
+
42
+ def max_hops
43
+ @http_options[:http_max_redirects] + 1
44
+ end
45
+
46
+ def follow_option
47
+ if max_hops > 1
48
+ { max_hops: max_hops }
49
+ else
50
+ # i.e. Do not follow redirects as we have set http_max_redirects to 0
51
+ # Setting `{ max_hops: 1 }` does not work FWIW
52
+ false
40
53
  end
54
+ end
55
+
56
+ def build_client
57
+ client = HTTP::Client.new(follow: follow_option)
41
58
 
42
- @options[:headers].each do |header, value|
43
- request[header.to_s] = value
59
+ if @http_options[:basic_auth_user] && @http_options[:basic_auth_password]
60
+ client = client.basic_auth(
61
+ user: @http_options[:basic_auth_user],
62
+ pass: @http_options[:basic_auth_password]
63
+ )
44
64
  end
45
- request
65
+
66
+ client
46
67
  end
47
68
 
48
- def finish
49
- @finished = true
50
- @http.finish if !@http.nil? && @http.started?
69
+ def using_proxy
70
+ proxy = @http_options[:http_proxy_uri]
71
+ return nil unless proxy
72
+ p_uri = URI.parse(proxy)
73
+ {
74
+ proxy_address: p_uri.hostname,
75
+ proxy_port: p_uri.port,
76
+ proxy_username: p_uri.user,
77
+ proxy_password: p_uri.password
78
+ }
79
+ end
80
+
81
+ def build_client_options
82
+ client_options = {
83
+ headers: @http_options[:headers],
84
+ proxy: using_proxy
85
+ }
86
+ if @http_options[:ssl]
87
+ client_options[:ssl] = @http_options[:ssl]
88
+ socket_option = :ssl_socket_class
89
+ else
90
+ socket_option = :socket_class
91
+ end
92
+ client_options[socket_option] = @http_options[socket_option] if @http_options[socket_option]
93
+ client_options
51
94
  end
52
95
  end
53
96
  end
data/lib/kubeclient.rb CHANGED
@@ -1,92 +1,35 @@
1
- require 'kubeclient/version'
2
1
  require 'json'
3
2
  require 'rest-client'
4
- require 'active_support/inflector'
3
+
4
+ require 'kubeclient/aws_eks_credentials'
5
+ require 'kubeclient/common'
6
+ require 'kubeclient/config'
5
7
  require 'kubeclient/entity_list'
6
- require 'kubeclient/kube_exception'
7
- require 'kubeclient/watch_notice'
8
+ require 'kubeclient/exec_credentials'
9
+ require 'kubeclient/gcp_auth_provider'
10
+ require 'kubeclient/http_error'
11
+ require 'kubeclient/missing_kind_compatibility'
12
+ require 'kubeclient/oidc_auth_provider'
13
+ require 'kubeclient/resource'
14
+ require 'kubeclient/resource_not_found_error'
15
+ require 'kubeclient/version'
8
16
  require 'kubeclient/watch_stream'
9
- require 'kubeclient/common'
10
17
 
11
18
  module Kubeclient
12
19
  # Kubernetes Client
13
- class Client < Common::Client
14
- attr_reader :api_endpoint
15
-
16
- # Dynamically creating classes definitions (class Pod, class Service, etc.),
17
- # The classes are extending RecursiveOpenStruct.
18
- # This cancels the need to define the classes
19
- # manually on every new entity addition,
20
- # and especially since currently the class body is empty
21
- ENTITY_TYPES = %w(Pod Service ReplicationController Node Event Endpoint
22
- Namespace Secret).map do |et|
23
- clazz = Class.new(RecursiveOpenStruct) do
24
- def initialize(hash = nil, args = {})
25
- args.merge!(recurse_over_arrays: true)
26
- super(hash, args)
27
- end
28
- end
29
- [Kubeclient.const_set(et, clazz), et]
30
- end
31
-
32
- def initialize(uri,
33
- version = 'v1beta3',
34
- ssl_options: {
35
- client_cert: nil,
36
- client_key: nil,
37
- ca_file: nil,
38
- verify_ssl: OpenSSL::SSL::VERIFY_PEER
39
- },
40
- auth_options: {}
41
- )
42
-
43
- fail ArgumentError, 'Missing uri' if uri.nil?
44
-
45
- validate_auth_options(auth_options)
46
-
47
- handle_uri(uri, '/api')
48
- @api_version = version
49
- @headers = {}
50
- @ssl_options = ssl_options
51
-
52
- if auth_options[:user]
53
- @basic_auth_user = auth_options[:user]
54
- @basic_auth_password = auth_options[:password]
55
- elsif auth_options[:bearer_token]
56
- bearer_token(auth_options[:bearer_token])
57
- elsif auth_options[:bearer_token_file]
58
- validate_bearer_token_file(auth_options[:bearer_token_file])
59
- bearer_token(File.read(auth_options[:bearer_token_file]))
60
- end
61
- end
62
-
63
- def all_entities
64
- retrieve_all_entities(ENTITY_TYPES)
65
- end
66
-
67
- define_entity_methods(ENTITY_TYPES)
68
-
69
- private
70
-
71
- def validate_auth_options(opts)
72
- exclusive_keys = [:bearer_token, :bearer_token_file, :user]
73
-
74
- return if exclusive_keys.none? { |s| opts.key?(s) }
75
-
76
- msg = 'Invalid auth options: specify only one of user/password,' \
77
- ' bearer_token or bearer_token_file'
78
- fail ArgumentError, msg unless exclusive_keys.one? { |s| opts.key?(s) }
79
-
80
- msg = 'Basic auth requires both user & password'
81
- fail ArgumentError, msg if opts.key?(:user) && !opts.key?(:password)
82
- end
83
-
84
- def validate_bearer_token_file(bearer_token_file)
85
- msg = "Token file #{bearer_token_file} does not exist"
86
- fail ArgumentError, msg unless File.file?(bearer_token_file)
87
-
88
- msg = "Cannot read token file #{bearer_token_file}"
89
- fail ArgumentError, msg unless File.readable?(bearer_token_file)
20
+ class Client
21
+ include ClientMixin
22
+ def initialize(
23
+ uri,
24
+ version = 'v1',
25
+ **options
26
+ )
27
+ initialize_client(
28
+ uri,
29
+ '/api',
30
+ version,
31
+ **options
32
+ )
90
33
  end
91
34
  end
92
35
  end
metadata CHANGED
@@ -1,69 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubeclient
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 4.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alissa Bonas
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2021-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '12.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '12.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest-rg
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: webmock
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - '>='
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: vcr
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
60
88
  - !ruby/object:Gem::Version
61
89
  version: '0'
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
- - - '>='
94
+ - - ">="
67
95
  - !ruby/object:Gem::Version
68
96
  version: '0'
69
97
  - !ruby/object:Gem::Dependency
@@ -72,70 +100,124 @@ dependencies:
72
100
  requirements:
73
101
  - - '='
74
102
  - !ruby/object:Gem::Version
75
- version: 0.30.0
103
+ version: 0.49.1
76
104
  type: :development
77
105
  prerelease: false
78
106
  version_requirements: !ruby/object:Gem::Requirement
79
107
  requirements:
80
108
  - - '='
81
109
  - !ruby/object:Gem::Version
82
- version: 0.30.0
110
+ version: 0.49.1
83
111
  - !ruby/object:Gem::Dependency
84
- name: rest-client
112
+ name: googleauth
85
113
  requirement: !ruby/object:Gem::Requirement
86
114
  requirements:
87
- - - '>='
115
+ - - "~>"
88
116
  - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
117
+ version: 0.5.1
118
+ type: :development
91
119
  prerelease: false
92
120
  version_requirements: !ruby/object:Gem::Requirement
93
121
  requirements:
94
- - - '>='
122
+ - - "~>"
95
123
  - !ruby/object:Gem::Version
96
- version: '0'
124
+ version: 0.5.1
97
125
  - !ruby/object:Gem::Dependency
98
- name: activesupport
126
+ name: mocha
99
127
  requirement: !ruby/object:Gem::Requirement
100
128
  requirements:
101
- - - '>='
129
+ - - "~>"
102
130
  - !ruby/object:Gem::Version
103
- version: '0'
131
+ version: '1.5'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '1.5'
139
+ - !ruby/object:Gem::Dependency
140
+ name: openid_connect
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '1.1'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '1.1'
153
+ - !ruby/object:Gem::Dependency
154
+ name: jsonpath
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.0'
104
160
  type: :runtime
105
161
  prerelease: false
106
162
  version_requirements: !ruby/object:Gem::Requirement
107
163
  requirements:
108
- - - '>='
164
+ - - "~>"
109
165
  - !ruby/object:Gem::Version
110
- version: '0'
166
+ version: '1.0'
111
167
  - !ruby/object:Gem::Dependency
112
- name: json
168
+ name: rest-client
113
169
  requirement: !ruby/object:Gem::Requirement
114
170
  requirements:
115
- - - '>='
171
+ - - "~>"
116
172
  - !ruby/object:Gem::Version
117
- version: '0'
173
+ version: '2.0'
118
174
  type: :runtime
119
175
  prerelease: false
120
176
  version_requirements: !ruby/object:Gem::Requirement
121
177
  requirements:
122
- - - '>='
178
+ - - "~>"
123
179
  - !ruby/object:Gem::Version
124
- version: '0'
180
+ version: '2.0'
125
181
  - !ruby/object:Gem::Dependency
126
182
  name: recursive-open-struct
127
183
  requirement: !ruby/object:Gem::Requirement
128
184
  requirements:
129
- - - '='
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '1.1'
188
+ - - ">="
130
189
  - !ruby/object:Gem::Version
131
- version: 0.6.1
190
+ version: 1.1.1
132
191
  type: :runtime
133
192
  prerelease: false
134
193
  version_requirements: !ruby/object:Gem::Requirement
135
194
  requirements:
136
- - - '='
195
+ - - "~>"
196
+ - !ruby/object:Gem::Version
197
+ version: '1.1'
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: 1.1.1
201
+ - !ruby/object:Gem::Dependency
202
+ name: http
203
+ requirement: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '3.0'
208
+ - - "<"
209
+ - !ruby/object:Gem::Version
210
+ version: '5.0'
211
+ type: :runtime
212
+ prerelease: false
213
+ version_requirements: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - ">="
216
+ - !ruby/object:Gem::Version
217
+ version: '3.0'
218
+ - - "<"
137
219
  - !ruby/object:Gem::Version
138
- version: 0.6.1
220
+ version: '5.0'
139
221
  description: A client for Kubernetes REST api
140
222
  email:
141
223
  - abonas@redhat.com
@@ -143,109 +225,53 @@ executables: []
143
225
  extensions: []
144
226
  extra_rdoc_files: []
145
227
  files:
146
- - .gitignore
147
- - .rubocop.yml
148
- - .travis.yml
228
+ - ".github/workflows/actions.yml"
229
+ - ".gitignore"
230
+ - ".rubocop.yml"
231
+ - CHANGELOG.md
149
232
  - Gemfile
150
233
  - LICENSE.txt
151
234
  - README.md
235
+ - RELEASING.md
152
236
  - Rakefile
153
237
  - kubeclient.gemspec
154
238
  - lib/kubeclient.rb
239
+ - lib/kubeclient/aws_eks_credentials.rb
155
240
  - lib/kubeclient/common.rb
241
+ - lib/kubeclient/config.rb
156
242
  - lib/kubeclient/entity_list.rb
157
- - lib/kubeclient/kube_exception.rb
243
+ - lib/kubeclient/exec_credentials.rb
244
+ - lib/kubeclient/gcp_auth_provider.rb
245
+ - lib/kubeclient/gcp_command_credentials.rb
246
+ - lib/kubeclient/google_application_default_credentials.rb
247
+ - lib/kubeclient/http_error.rb
248
+ - lib/kubeclient/missing_kind_compatibility.rb
249
+ - lib/kubeclient/oidc_auth_provider.rb
250
+ - lib/kubeclient/resource.rb
251
+ - lib/kubeclient/resource_not_found_error.rb
158
252
  - lib/kubeclient/version.rb
159
- - lib/kubeclient/watch_notice.rb
160
253
  - lib/kubeclient/watch_stream.rb
161
- - test/json/created_namespace_b3.json
162
- - test/json/created_secret.json
163
- - test/json/created_service_b3.json
164
- - test/json/empty_pod_list_b3.json
165
- - test/json/endpoint_list_b3.json
166
- - test/json/entity_list_b3.json
167
- - test/json/event_list_b3.json
168
- - test/json/namespace_b3.json
169
- - test/json/namespace_exception_b3.json
170
- - test/json/namespace_list_b3.json
171
- - test/json/node_b3.json
172
- - test/json/node_list_b3.json
173
- - test/json/pod_b3.json
174
- - test/json/pod_list_b3.json
175
- - test/json/replication_controller_b3.json
176
- - test/json/replication_controller_list_b3.json
177
- - test/json/secret_list_b3.json
178
- - test/json/service_b3.json
179
- - test/json/service_illegal_json_404.json
180
- - test/json/service_list_b3.json
181
- - test/json/service_update_b3.json
182
- - test/json/versions_list.json
183
- - test/json/watch_stream_b3.json
184
- - test/test_helper.rb
185
- - test/test_kubeclient.rb
186
- - test/test_namespace.rb
187
- - test/test_node.rb
188
- - test/test_pod.rb
189
- - test/test_replication_controller.rb
190
- - test/test_secret.rb
191
- - test/test_service.rb
192
- - test/test_watch.rb
193
- - test/valid_token_file
194
254
  homepage: https://github.com/abonas/kubeclient
195
255
  licenses:
196
256
  - MIT
197
257
  metadata: {}
198
- post_install_message:
258
+ post_install_message:
199
259
  rdoc_options: []
200
260
  require_paths:
201
261
  - lib
202
262
  required_ruby_version: !ruby/object:Gem::Requirement
203
263
  requirements:
204
- - - '>='
264
+ - - ">="
205
265
  - !ruby/object:Gem::Version
206
- version: 2.0.0
266
+ version: 2.2.0
207
267
  required_rubygems_version: !ruby/object:Gem::Requirement
208
268
  requirements:
209
- - - '>='
269
+ - - ">="
210
270
  - !ruby/object:Gem::Version
211
271
  version: '0'
212
272
  requirements: []
213
- rubyforge_project:
214
- rubygems_version: 2.4.5
215
- signing_key:
273
+ rubygems_version: 3.2.3
274
+ signing_key:
216
275
  specification_version: 4
217
276
  summary: A client for Kubernetes REST api
218
- test_files:
219
- - test/json/created_namespace_b3.json
220
- - test/json/created_secret.json
221
- - test/json/created_service_b3.json
222
- - test/json/empty_pod_list_b3.json
223
- - test/json/endpoint_list_b3.json
224
- - test/json/entity_list_b3.json
225
- - test/json/event_list_b3.json
226
- - test/json/namespace_b3.json
227
- - test/json/namespace_exception_b3.json
228
- - test/json/namespace_list_b3.json
229
- - test/json/node_b3.json
230
- - test/json/node_list_b3.json
231
- - test/json/pod_b3.json
232
- - test/json/pod_list_b3.json
233
- - test/json/replication_controller_b3.json
234
- - test/json/replication_controller_list_b3.json
235
- - test/json/secret_list_b3.json
236
- - test/json/service_b3.json
237
- - test/json/service_illegal_json_404.json
238
- - test/json/service_list_b3.json
239
- - test/json/service_update_b3.json
240
- - test/json/versions_list.json
241
- - test/json/watch_stream_b3.json
242
- - test/test_helper.rb
243
- - test/test_kubeclient.rb
244
- - test/test_namespace.rb
245
- - test/test_node.rb
246
- - test/test_pod.rb
247
- - test/test_replication_controller.rb
248
- - test/test_secret.rb
249
- - test/test_service.rb
250
- - test/test_watch.rb
251
- - test/valid_token_file
277
+ test_files: []
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "2.0"
4
- - "2.1"
5
- sudo: false
6
- cache: bundler
@@ -1,13 +0,0 @@
1
- # Kubernetes HTTP Exceptions
2
- class KubeException < StandardError
3
- attr_reader :error_code, :message
4
-
5
- def initialize(error_code, message)
6
- @error_code = error_code
7
- @message = message
8
- end
9
-
10
- def to_s
11
- 'HTTP status code ' + @error_code.to_s + ', ' + @message
12
- end
13
- end
@@ -1,7 +0,0 @@
1
- require 'recursive_open_struct'
2
- module Kubeclient
3
- module Common
4
- class WatchNotice < RecursiveOpenStruct
5
- end
6
- end
7
- end
@@ -1,20 +0,0 @@
1
- {
2
- "kind": "Namespace",
3
- "apiVersion": "v1beta3",
4
- "metadata": {
5
- "name": "development",
6
- "selfLink": "/api/v1beta3/namespaces/development",
7
- "uid": "13d820d6-df5b-11e4-bd42-f8b156af4ae1",
8
- "resourceVersion": "2533",
9
- "creationTimestamp": "2015-04-10T08:24:59Z"
10
- },
11
- "spec": {
12
- "finalizers": [
13
- "kubernetes"
14
- ]
15
- },
16
- "status": {
17
- "phase": "Active"
18
- }
19
- }
20
-