k8s-ruby2 0.10.7 → 0.10.8
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/Gemfile.lock +1 -1
- data/lib/k8s/ruby/version.rb +1 -1
- data/lib/k8s/transport.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81cc0649baf215e8752b780d291c665e8ba3459d81ce833753f02acfb7d7433d
|
|
4
|
+
data.tar.gz: '055386dc40656b18b56b8183a5a3349a8acdbe736bdd333e4ec68676c421b800'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77c3b7fd5108604d254aba24f67c84277a9025627c1a5fe7afd4d4f8ee77e3abe3a0be343f2e83d2e9a1a76854295bef8f1b8fe72b2b6fa7a10290326e7c9f0a
|
|
7
|
+
data.tar.gz: a506f96d9ec9c60776da5f5a87a3a74b7aa17357a7511a0b9585aff2589f52ec5679539eaac2b1f3f0a575aa7fc57e7eb84c99f14022128c2b264f52010dc20e
|
data/Gemfile.lock
CHANGED
data/lib/k8s/ruby/version.rb
CHANGED
data/lib/k8s/transport.rb
CHANGED
|
@@ -73,9 +73,9 @@ module K8s
|
|
|
73
73
|
logger.debug "Using config with .user.token=..."
|
|
74
74
|
|
|
75
75
|
options[:auth_token] = token
|
|
76
|
-
elsif config.user.auth_provider &&
|
|
76
|
+
elsif config.user.auth_provider && auth_provider_config = config.user.auth_provider.config
|
|
77
77
|
logger.debug "Using config with .user.auth-provider.name=#{config.user.auth_provider.name}"
|
|
78
|
-
options[:auth_token] =
|
|
78
|
+
options[:auth_token] = token_from_auth_provider_config(auth_provider_config)
|
|
79
79
|
elsif exec_conf = config.user.exec
|
|
80
80
|
logger.debug "Using config with .user.exec.command=#{exec_conf.command}"
|
|
81
81
|
options[:auth_token] = token_from_exec(exec_conf)
|
|
@@ -93,10 +93,10 @@ module K8s
|
|
|
93
93
|
|
|
94
94
|
# @param auth_provider [K8s::Config::UserAuthProvider]
|
|
95
95
|
# @return [String]
|
|
96
|
-
def self.
|
|
97
|
-
auth_data = `#{
|
|
98
|
-
if
|
|
99
|
-
json_path = JsonPath.new(
|
|
96
|
+
def self.token_from_auth_provider_config(auth_provider_config)
|
|
97
|
+
auth_data = `#{auth_provider_config['cmd-path']} #{auth_provider_config['cmd-args']}`.strip
|
|
98
|
+
if auth_provider_config['token-key']
|
|
99
|
+
json_path = JsonPath.new(auth_provider_config['token-key'][1...-1])
|
|
100
100
|
json_path.first(auth_data)
|
|
101
101
|
else
|
|
102
102
|
auth_data
|