krane 3.4.0 → 3.4.1

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: 0a400c15e247a60bf8596665ddf2737abb44c2418358212e689890eb2178956f
4
- data.tar.gz: '0386e1417ba00c97add6aa7184176785f82d05de5453140a8806540833c85f46'
3
+ metadata.gz: 5d9fd3a2bdcd247f19399a1617e4b3d7c2534b78535a05fe2609e1770fbcb943
4
+ data.tar.gz: 58f419d984de460814ceb27212e577b26d81e243f5be9b3821a0b348e314b975
5
5
  SHA512:
6
- metadata.gz: a8b4c706a3918d6d3b66f098ae03c1e02680d59bef3f8eab34248997bfc11e512206f1b1d1794f50f12965e7a0cffbb2df2293b4639dd28b4b8526db881cf315
7
- data.tar.gz: 7d113bfa20d8dec893fa3494ea7f55a9bf89c3a59ca7a461e1076c5fed37c2725b495a96efa5034c18b857819c96f5803045dec444a3c205e70f647b162f8106
6
+ metadata.gz: '0443799d9c0b820269127bedc5c2ee8ad7ef4de195bceb8b0cd65f46d55e169b19be24e50798901796ff33b46a34e21af5d2e2e5c3adfff2cf9464fd52899f27'
7
+ data.tar.gz: 81647888f3cca18356273f23802960d683830d68bb373da6031e64791374ef276a42f8161bf2f50b57dd46de6934d924dde85ddf70c6ac9930fb9f8163c0f452
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## next
2
2
 
3
+ # 3.4.1
4
+
5
+ - Added flag `--skip-dry-run` to completely opt out of dry run validation.
6
+
3
7
  # 3.4.0
4
8
 
5
9
  - Use `prune-allowlist` instead of `prune-whitelist` for 1.26+ clusters. Clusters running 1.25 or less will continue to use `--prune-whitelist`. [#940](https://github.com/Shopify/krane/pull/940)
@@ -33,6 +33,7 @@ module Krane
33
33
  default: false },
34
34
  "verify-result" => { type: :boolean, default: true,
35
35
  desc: "Verify workloads correctly deployed" },
36
+ "skip-dry-run" => { type: :boolean, desc: "Enable skipping dry run", default: false},
36
37
  }
37
38
 
38
39
  def self.from_options(namespace, context, options)
@@ -71,6 +72,7 @@ module Krane
71
72
  selector: selector,
72
73
  selector_as_filter: selector_as_filter,
73
74
  protected_namespaces: protected_namespaces,
75
+ skip_dry_run: options["skip-dry-run"]
74
76
  )
75
77
 
76
78
  deploy.run!(
@@ -106,7 +106,7 @@ module Krane
106
106
  # @param render_erb [Boolean] Enable ERB rendering
107
107
  def initialize(namespace:, context:, current_sha: nil, logger: nil, kubectl_instance: nil, bindings: {},
108
108
  global_timeout: nil, selector: nil, selector_as_filter: false, filenames: [], protected_namespaces: nil,
109
- render_erb: false, kubeconfig: nil)
109
+ render_erb: false, kubeconfig: nil, skip_dry_run: false)
110
110
  @logger = logger || Krane::FormattedLogger.build(namespace, context)
111
111
  @template_sets = TemplateSets.from_dirs_and_files(paths: filenames, logger: @logger, render_erb: render_erb)
112
112
  @task_config = Krane::TaskConfig.new(context, namespace, @logger, kubeconfig)
@@ -121,6 +121,7 @@ module Krane
121
121
  @selector_as_filter = selector_as_filter
122
122
  @protected_namespaces = protected_namespaces || PROTECTED_NAMESPACES
123
123
  @render_erb = render_erb
124
+ @skip_dry_run = skip_dry_run
124
125
  end
125
126
 
126
127
  # Runs the task, returning a boolean representing success or failure
@@ -286,7 +287,7 @@ module Krane
286
287
 
287
288
  def validate_resources(resources)
288
289
  validate_globals(resources)
289
- batch_dry_run_success = validate_dry_run(resources)
290
+ batch_dry_run_success = @skip_dry_run || validate_dry_run(resources)
290
291
  resources.select! { |r| r.selected?(@selector) } if @selector_as_filter
291
292
  Krane::Concurrency.split_across_threads(resources) do |r|
292
293
  # No need to pass in kubectl (and do per-resource dry run apply) if batch dry run succeeded
data/lib/krane/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Krane
3
- VERSION = "3.4.0"
3
+ VERSION = "3.4.1"
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: 3.4.0
4
+ version: 3.4.1
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: 2023-12-13 00:00:00.000000000 Z
13
+ date: 2024-01-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -525,7 +525,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
525
525
  - !ruby/object:Gem::Version
526
526
  version: '0'
527
527
  requirements: []
528
- rubygems_version: 3.4.22
528
+ rubygems_version: 3.5.5
529
529
  signing_key:
530
530
  specification_version: 4
531
531
  summary: A command line tool that helps you ship changes to a Kubernetes namespace