krane 2.4.6 → 2.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/krane/kubectl.rb +13 -10
- data/lib/krane/kubernetes_resource.rb +1 -1
- data/lib/krane/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ea2d6805d4bcb71c3d3f70d99cb27a6bd392636a19077cea322f782e815b072
|
4
|
+
data.tar.gz: a7aaf751e8d1de0f47006b41bd115615f49b2ba05ff1486447e3747bd467722b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6f742a8c88c993c9c255ce27ae1419989e03810a21cc656bcc6b0766496b0fdeed7ead385e97d30a77c5c03b56c3fac5039e5c2556ed8ceb4a04a6fca31f7e1
|
7
|
+
data.tar.gz: 9ec49b7ffdacf6a58a1e498c1c17be51a2a2c063c613d5ecb391d704383803d3b8911e91bcca125e14fa03b82252ad3e040511e9cc7c632506a9074cd2dafff3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
## next
|
2
2
|
|
3
|
+
## 2.4.7
|
4
|
+
|
5
|
+
*Bug fixes*
|
6
|
+
|
7
|
+
- Fix `replace-force` deployment method override.
|
8
|
+
```
|
9
|
+
/usr/local/bundle/gems/krane-2.4.6/lib/krane/resource_deployer.rb:119:in `block in deploy_resources': Unexpected deploy method! (:"replace-force") (ArgumentError)
|
10
|
+
```
|
11
|
+
Dash (-) must be replaced with underscore (_) before applying it as method on kubernetes resource.
|
12
|
+
|
3
13
|
## 2.4.6
|
4
14
|
|
5
15
|
*Bug fixes*
|
data/lib/krane/kubectl.rb
CHANGED
@@ -82,9 +82,17 @@ module Krane
|
|
82
82
|
def version_info
|
83
83
|
@version_info ||=
|
84
84
|
begin
|
85
|
-
response, _, status = run("version", use_namespace: false, log_failure: true, attempts: 2)
|
85
|
+
response, _, status = run("version", output: "json", use_namespace: false, log_failure: true, attempts: 2)
|
86
86
|
raise KubectlError, "Could not retrieve kubectl version info" unless status.success?
|
87
|
-
|
87
|
+
|
88
|
+
version_data = JSON.parse(response)
|
89
|
+
client_version = platform_agnostic_version(version_data.dig("clientVersion", "gitVersion").to_s)
|
90
|
+
server_version = platform_agnostic_version(version_data.dig("serverVersion", "gitVersion").to_s)
|
91
|
+
unless client_version && server_version
|
92
|
+
raise KubectlError, "Received invalid kubectl version data: #{version_data}"
|
93
|
+
end
|
94
|
+
|
95
|
+
{ client: client_version, server: server_version }
|
88
96
|
end
|
89
97
|
end
|
90
98
|
|
@@ -127,15 +135,10 @@ module Krane
|
|
127
135
|
end
|
128
136
|
end
|
129
137
|
|
130
|
-
def
|
131
|
-
|
132
|
-
|
133
|
-
match = l.match(/^(?<kind>Client|Server).* GitVersion:"v(?<version>\d+\.\d+\.\d+)/)
|
134
|
-
if match
|
135
|
-
info[match[:kind].downcase.to_sym] = Gem::Version.new(match[:version])
|
136
|
-
end
|
138
|
+
def platform_agnostic_version(version_string)
|
139
|
+
if match = version_string.match(/v(?<version>\d+\.\d+\.\d+)/)
|
140
|
+
Gem::Version.new(match[:version])
|
137
141
|
end
|
138
|
-
info
|
139
142
|
end
|
140
143
|
end
|
141
144
|
end
|
@@ -250,7 +250,7 @@ module Krane
|
|
250
250
|
end
|
251
251
|
|
252
252
|
def deploy_method_override
|
253
|
-
krane_annotation_value(DEPLOY_METHOD_OVERRIDE_ANNOTATION)&.to_sym
|
253
|
+
krane_annotation_value(DEPLOY_METHOD_OVERRIDE_ANNOTATION)&.gsub("-", "_")&.to_sym
|
254
254
|
end
|
255
255
|
|
256
256
|
def sync_debug_info(kubectl)
|
data/lib/krane/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: krane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katrina Verey
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|