krane 2.1.4 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ae8bb4b0c7f920136990847601e19c7767075a89ead99781213feaf309d623d
4
- data.tar.gz: 90ad58122ca788ebd4010e62e624c0d73a0c153e48c942673e244e7fbb4ccb32
3
+ metadata.gz: ae99732594c24143e48be0c4c44fdfec9f3f81e7d604362f8d000df837758aaa
4
+ data.tar.gz: 11684058ac036a9846e5101944c0f26e33216da3d87bde0f20fe13246e52bbb5
5
5
  SHA512:
6
- metadata.gz: 7e09bdb58b4bca4380b77bb10589a2e5b57aa31e9d8838c4b6efc68ccbf58b5af84c360a1a2710564164e4d6f19419cd38d7b3952559c56d5f7dc026d432a194
7
- data.tar.gz: 659649bf0d0cfbe04d3fad0f32f3a05cc6ed9e117ca0755bf808d898b60dbf0d5be88cad609de1589cd93eb2b808e6cc9994a73f7b21267920b679b71afd138e
6
+ metadata.gz: 36fec016df1d46e0bec3b7889913bbaa20bdb411795bb58b9995a87dde2bd0ed94203b21d229673fa8fe3d663d60981ce0e4d666acc173e7262b67a3671209ac
7
+ data.tar.gz: df91b23d97e65489476c5ddb9f404e07c7a314003d84debd6cb5d59c27328f9a48394876af32a7ccb3976d3bfb296f60cd54af4c4fbdca6c31527ce86c2ad19a
@@ -1,5 +1,9 @@
1
1
  ## next
2
2
 
3
+ ## 2.1.5
4
+
5
+ - Fix bug where the wrong dry-run flag is used for kubectl if client version is below 1.18 AND server version is 1.18+ [#793](https://github.com/Shopify/krane/pull/793).
6
+
3
7
  ## 2.1.4
4
8
 
5
9
  *Enhancements*
@@ -279,7 +279,7 @@ module Krane
279
279
 
280
280
  def validate_resources(resources)
281
281
  validate_globals(resources)
282
- batch_dry_run_success = validate_dry_run(resources)
282
+ batch_dry_run_success = kubectl.server_dry_run_enabled? && validate_dry_run(resources)
283
283
  Krane::Concurrency.split_across_threads(resources) do |r|
284
284
  # No need to pass in kubectl (and do per-resource dry run apply) if batch dry run succeeded
285
285
  if batch_dry_run_success
@@ -101,7 +101,7 @@ module Krane
101
101
  end
102
102
 
103
103
  def dry_run_flag
104
- if server_version >= Gem::Version.new("1.18")
104
+ if client_version >= Gem::Version.new("1.18")
105
105
  "--dry-run=server"
106
106
  else
107
107
  "--server-dry-run"
@@ -560,7 +560,7 @@ module Krane
560
560
 
561
561
  # Server side dry run is only supported on apply
562
562
  def validate_with_server_side_dry_run(kubectl)
563
- command = if kubectl.server_version >= Gem::Version.new('1.18')
563
+ command = if kubectl.client_version >= Gem::Version.new('1.18')
564
564
  ["apply", "-f", file_path, "--dry-run=server", "--output=name"]
565
565
  else
566
566
  ["apply", "-f", file_path, "--server-dry-run", "--output=name"]
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Krane
3
- VERSION = "2.1.4"
3
+ VERSION = "2.1.5"
4
4
  end
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.1.4
4
+ version: 2.1.5
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: 2021-01-20 00:00:00.000000000 Z
13
+ date: 2021-01-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport