kubeclient 4.11.0 → 4.13.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.
- checksums.yaml +4 -4
- data/.github/workflows/actions.yml +6 -3
- data/CHANGELOG.md +29 -0
- data/Gemfile +2 -0
- data/README.md +4 -0
- data/Rakefile +2 -0
- data/kubeclient.gemspec +3 -2
- data/lib/kubeclient/aws_eks_credentials.rb +17 -8
- data/lib/kubeclient/common.rb +2 -0
- data/lib/kubeclient/config.rb +2 -0
- data/lib/kubeclient/entity_list.rb +2 -0
- data/lib/kubeclient/http_error.rb +3 -1
- data/lib/kubeclient/missing_kind_compatibility.rb +2 -0
- data/lib/kubeclient/resource.rb +2 -0
- data/lib/kubeclient/resource_not_found_error.rb +2 -0
- data/lib/kubeclient/version.rb +1 -1
- data/lib/kubeclient/watch_stream.rb +3 -1
- data/lib/kubeclient.rb +2 -0
- metadata +17 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9858f4780a4a7d41775e8d46ea883e20aaf81dafc1746dd7ff8f0dcfdf93e698
|
|
4
|
+
data.tar.gz: 8a9b822f0a2c8fecc628b18cade0230a623bd36bdb9d2dbd8f7ae8a70748b766
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ddbf8c6bca62614d39d54bf27a450562b1956542e5ebd4f6376673b5785cfc424b3ea58afc4f8d674219f9bc87f29e9bed1b915c1093b1aaad7c393debd0c6a
|
|
7
|
+
data.tar.gz: 6c23cfa4ddd994800e12a29ca379f54f5a50ebc98d1b81d5162b1712b101f1d90e5e5ce30530664641546adc8781db6f252a8120b402554dced874861a71b72a
|
|
@@ -14,7 +14,7 @@ jobs:
|
|
|
14
14
|
runs-on: ${{ matrix.os_and_command.os }}
|
|
15
15
|
strategy:
|
|
16
16
|
matrix:
|
|
17
|
-
ruby: [ '2.7', '3.0', '3.1', 'ruby-head', 'truffleruby-head' ]
|
|
17
|
+
ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', 'ruby-head', 'truffleruby-head' ]
|
|
18
18
|
os_and_command:
|
|
19
19
|
- os: macos-latest
|
|
20
20
|
command: 'env TESTOPTS="--verbose" bundle exec rake test'
|
|
@@ -29,9 +29,13 @@ jobs:
|
|
|
29
29
|
- os: ubuntu-latest
|
|
30
30
|
ruby: '2.7'
|
|
31
31
|
command: 'bundle exec rake rubocop'
|
|
32
|
+
exclude:
|
|
33
|
+
- os_and_command:
|
|
34
|
+
os: windows-latest
|
|
35
|
+
ruby: 'truffleruby-head'
|
|
32
36
|
name: ${{ matrix.os_and_command.os }} ${{ matrix.ruby }} rake ${{ matrix.os_and_command.command }}
|
|
33
37
|
steps:
|
|
34
|
-
- uses: actions/checkout@
|
|
38
|
+
- uses: actions/checkout@v4
|
|
35
39
|
# actions/setup-ruby did not support truffle or bundler caching
|
|
36
40
|
- uses: ruby/setup-ruby@v1
|
|
37
41
|
with:
|
|
@@ -40,4 +44,3 @@ jobs:
|
|
|
40
44
|
- run: bundle install
|
|
41
45
|
- run: ${{ matrix.os_and_command.command }}
|
|
42
46
|
timeout-minutes: 10
|
|
43
|
-
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@ Notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
|
5
5
|
Kubeclient release versioning follows [SemVer](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## 4.13.0 - 2025-10-15
|
|
8
|
+
### Added
|
|
9
|
+
- [v4.y] Add cgi gem to devel dependencies (#672)
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- [v4.y] use frozen strings (#668)
|
|
13
|
+
- [v4.y] Exclude windows-latest from truffleruby testing (#675)
|
|
14
|
+
- [v4.y] Add 3.3 and 3.4 to CI matrix (#671)
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- [v4.y] Update k0s certs for CI (#671)
|
|
18
|
+
|
|
19
|
+
## 4.12.0 - 2024-06-18
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- Add test coverage for Ruby 3.2 (#615)
|
|
23
|
+
- Allow a region when getting a signer for Aws::Sts (#507)
|
|
24
|
+
- Update the AWS STS endpoint to be regional as the method is now regional (#528)
|
|
25
|
+
- Assume role support for aws eks credentials (#630)
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- [v4.y] Regenerated expired test TLS certs by running `test/config/update_certs_k0s.rb`.
|
|
29
|
+
- [v4.y] Regenerated expired test TLS certs (#611)
|
|
30
|
+
- Regenerated expired test TLS certs (#632)
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- Update actions/checkout (#590)
|
|
34
|
+
- chore(deps): update actions/checkout action to v4 (#619)
|
|
35
|
+
|
|
7
36
|
## 4.11.0 — 2022-12-22
|
|
8
37
|
|
|
9
38
|
### Removed
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -313,10 +313,14 @@ require 'aws-sdk-core'
|
|
|
313
313
|
credentials = Aws::Credentials.new(access_key, secret_key)
|
|
314
314
|
# Or a profile
|
|
315
315
|
credentials = Aws::SharedCredentials.new(profile_name: 'default').credentials
|
|
316
|
+
# Or for an STS Assumed Role Credentials or any other credential Provider other than Static Credentials
|
|
317
|
+
credentials = Aws::AssumeRoleCredentials.new({ client: sts_client, role_arn: role_arn, role_session_name: session_name })
|
|
316
318
|
|
|
319
|
+
# Kubeclient Auth Options
|
|
317
320
|
auth_options = {
|
|
318
321
|
bearer_token: Kubeclient::AmazonEksCredentials.token(credentials, eks_cluster_name)
|
|
319
322
|
}
|
|
323
|
+
|
|
320
324
|
client = Kubeclient::Client.new(
|
|
321
325
|
eks_cluster_https_endpoint, 'v1', auth_options: auth_options
|
|
322
326
|
)
|
data/Rakefile
CHANGED
data/kubeclient.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
lib = File.expand_path('
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require 'kubeclient/version'
|
|
6
6
|
|
|
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.add_development_dependency 'minitest-rg'
|
|
28
28
|
spec.add_development_dependency 'webmock', '~> 3.0'
|
|
29
29
|
spec.add_development_dependency 'vcr'
|
|
30
|
+
spec.add_development_dependency 'cgi'
|
|
30
31
|
spec.add_development_dependency 'rubocop', '= 0.49.1'
|
|
31
32
|
spec.add_development_dependency 'googleauth', '~> 0.5.1'
|
|
32
33
|
spec.add_development_dependency('mocha', '~> 1.5')
|
|
@@ -7,7 +7,7 @@ module Kubeclient
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
class << self
|
|
10
|
-
def token(credentials, eks_cluster)
|
|
10
|
+
def token(credentials, eks_cluster, region: 'us-east-1')
|
|
11
11
|
begin
|
|
12
12
|
require 'aws-sigv4'
|
|
13
13
|
require 'base64'
|
|
@@ -20,17 +20,26 @@ module Kubeclient
|
|
|
20
20
|
end
|
|
21
21
|
# https://github.com/aws/aws-sdk-ruby/pull/1848
|
|
22
22
|
# Get a signer
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
signer = if credentials.respond_to?(:credentials)
|
|
24
|
+
Aws::Sigv4::Signer.new(
|
|
25
|
+
service: 'sts',
|
|
26
|
+
region: region,
|
|
27
|
+
credentials_provider: credentials
|
|
28
|
+
)
|
|
29
|
+
else
|
|
30
|
+
Aws::Sigv4::Signer.new(
|
|
31
|
+
service: 'sts',
|
|
32
|
+
region: region,
|
|
33
|
+
credentials: credentials
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
credentials = credentials.credentials if credentials.respond_to?(:credentials)
|
|
29
38
|
|
|
30
39
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Sigv4/Signer.html#presign_url-instance_method
|
|
31
40
|
presigned_url_string = signer.presign_url(
|
|
32
41
|
http_method: 'GET',
|
|
33
|
-
url:
|
|
42
|
+
url: "https://sts.#{region}.amazonaws.com/?Action=GetCallerIdentity&Version=2011-06-15",
|
|
34
43
|
body: '',
|
|
35
44
|
credentials: credentials,
|
|
36
45
|
expires_in: 60,
|
data/lib/kubeclient/common.rb
CHANGED
data/lib/kubeclient/config.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# TODO: remove this on next major version bump
|
|
2
4
|
# Deprected http exception
|
|
3
5
|
class KubeException < StandardError
|
|
@@ -12,7 +14,7 @@ class KubeException < StandardError
|
|
|
12
14
|
def to_s
|
|
13
15
|
string = "HTTP status code #{@error_code}, #{@message}"
|
|
14
16
|
if @response.is_a?(RestClient::Response) && @response.request
|
|
15
|
-
string
|
|
17
|
+
string += " for #{@response.request.method.upcase} #{@response.request.url}"
|
|
16
18
|
end
|
|
17
19
|
string
|
|
18
20
|
end
|
data/lib/kubeclient/resource.rb
CHANGED
data/lib/kubeclient/version.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'json'
|
|
2
4
|
require 'http'
|
|
3
5
|
module Kubeclient
|
|
@@ -21,7 +23,7 @@ module Kubeclient
|
|
|
21
23
|
raise Kubeclient::HttpError.new(response.code, response.reason, response)
|
|
22
24
|
end
|
|
23
25
|
|
|
24
|
-
buffer = ''
|
|
26
|
+
buffer = +''
|
|
25
27
|
response.body.each do |chunk|
|
|
26
28
|
buffer << chunk
|
|
27
29
|
while (line = buffer.slice!(/.+\n/))
|
data/lib/kubeclient.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kubeclient
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.13.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alissa Bonas
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -94,6 +93,20 @@ dependencies:
|
|
|
94
93
|
- - ">="
|
|
95
94
|
- !ruby/object:Gem::Version
|
|
96
95
|
version: '0'
|
|
96
|
+
- !ruby/object:Gem::Dependency
|
|
97
|
+
name: cgi
|
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: '0'
|
|
103
|
+
type: :development
|
|
104
|
+
prerelease: false
|
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: '0'
|
|
97
110
|
- !ruby/object:Gem::Dependency
|
|
98
111
|
name: rubocop
|
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -283,7 +296,6 @@ homepage: https://github.com/abonas/kubeclient
|
|
|
283
296
|
licenses:
|
|
284
297
|
- MIT
|
|
285
298
|
metadata: {}
|
|
286
|
-
post_install_message:
|
|
287
299
|
rdoc_options: []
|
|
288
300
|
require_paths:
|
|
289
301
|
- lib
|
|
@@ -298,8 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
298
310
|
- !ruby/object:Gem::Version
|
|
299
311
|
version: '0'
|
|
300
312
|
requirements: []
|
|
301
|
-
rubygems_version: 3.
|
|
302
|
-
signing_key:
|
|
313
|
+
rubygems_version: 3.6.7
|
|
303
314
|
specification_version: 4
|
|
304
315
|
summary: A client for Kubernetes REST api
|
|
305
316
|
test_files: []
|