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.
- checksums.yaml +5 -5
- data/.github/workflows/actions.yml +35 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +29 -0
- data/CHANGELOG.md +208 -0
- data/Gemfile +3 -0
- data/README.md +706 -57
- data/RELEASING.md +69 -0
- data/Rakefile +3 -5
- data/kubeclient.gemspec +19 -11
- data/lib/kubeclient/aws_eks_credentials.rb +46 -0
- data/lib/kubeclient/common.rb +597 -161
- data/lib/kubeclient/config.rb +195 -0
- data/lib/kubeclient/entity_list.rb +7 -2
- data/lib/kubeclient/exec_credentials.rb +89 -0
- data/lib/kubeclient/gcp_auth_provider.rb +19 -0
- data/lib/kubeclient/gcp_command_credentials.rb +31 -0
- data/lib/kubeclient/google_application_default_credentials.rb +31 -0
- data/lib/kubeclient/http_error.rb +25 -0
- data/lib/kubeclient/missing_kind_compatibility.rb +68 -0
- data/lib/kubeclient/oidc_auth_provider.rb +52 -0
- data/lib/kubeclient/resource.rb +11 -0
- data/lib/kubeclient/resource_not_found_error.rb +4 -0
- data/lib/kubeclient/version.rb +1 -1
- data/lib/kubeclient/watch_stream.rb +71 -28
- data/lib/kubeclient.rb +25 -82
- metadata +140 -114
- data/.travis.yml +0 -6
- data/lib/kubeclient/kube_exception.rb +0 -13
- data/lib/kubeclient/watch_notice.rb +0 -7
- data/test/json/created_namespace_b3.json +0 -20
- data/test/json/created_secret.json +0 -16
- data/test/json/created_service_b3.json +0 -31
- data/test/json/empty_pod_list_b3.json +0 -9
- data/test/json/endpoint_list_b3.json +0 -48
- data/test/json/entity_list_b3.json +0 -56
- data/test/json/event_list_b3.json +0 -35
- data/test/json/namespace_b3.json +0 -13
- data/test/json/namespace_exception_b3.json +0 -8
- data/test/json/namespace_list_b3.json +0 -32
- data/test/json/node_b3.json +0 -29
- data/test/json/node_list_b3.json +0 -37
- data/test/json/pod_b3.json +0 -92
- data/test/json/pod_list_b3.json +0 -75
- data/test/json/replication_controller_b3.json +0 -57
- data/test/json/replication_controller_list_b3.json +0 -64
- data/test/json/secret_list_b3.json +0 -44
- data/test/json/service_b3.json +0 -33
- data/test/json/service_illegal_json_404.json +0 -1
- data/test/json/service_list_b3.json +0 -97
- data/test/json/service_update_b3.json +0 -22
- data/test/json/versions_list.json +0 -6
- data/test/json/watch_stream_b3.json +0 -3
- data/test/test_helper.rb +0 -4
- data/test/test_kubeclient.rb +0 -407
- data/test/test_namespace.rb +0 -53
- data/test/test_node.rb +0 -25
- data/test/test_pod.rb +0 -21
- data/test/test_replication_controller.rb +0 -24
- data/test/test_secret.rb +0 -58
- data/test/test_service.rb +0 -136
- data/test/test_watch.rb +0 -37
- data/test/valid_token_file +0 -1
@@ -1,53 +1,96 @@
|
|
1
1
|
require 'json'
|
2
|
-
require '
|
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,
|
7
|
+
def initialize(uri, http_options, formatter:)
|
8
8
|
@uri = uri
|
9
|
-
@
|
10
|
-
@
|
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
|
-
|
18
|
-
|
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
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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
|
31
|
+
rescue StandardError
|
32
32
|
raise unless @finished
|
33
33
|
end
|
34
34
|
|
35
|
-
def
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
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
|
-
@
|
43
|
-
|
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
|
-
|
65
|
+
|
66
|
+
client
|
46
67
|
end
|
47
68
|
|
48
|
-
def
|
49
|
-
|
50
|
-
|
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
|
-
|
3
|
+
|
4
|
+
require 'kubeclient/aws_eks_credentials'
|
5
|
+
require 'kubeclient/common'
|
6
|
+
require 'kubeclient/config'
|
5
7
|
require 'kubeclient/entity_list'
|
6
|
-
require 'kubeclient/
|
7
|
-
require 'kubeclient/
|
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
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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:
|
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:
|
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: '
|
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: '
|
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.
|
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.
|
110
|
+
version: 0.49.1
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
112
|
+
name: googleauth
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- -
|
115
|
+
- - "~>"
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
90
|
-
type: :
|
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:
|
124
|
+
version: 0.5.1
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
126
|
+
name: mocha
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
|
-
- -
|
129
|
+
- - "~>"
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
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:
|
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:
|
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
|
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
|
-
- .
|
147
|
-
- .
|
148
|
-
- .
|
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/
|
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.
|
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
|
-
|
214
|
-
|
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,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,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
|
-
|