krane 2.4.1 → 2.4.2

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: 93f7d9e842d616ea60e2c509f5e5a3fcb54d24375d426efd0345ba3a07dd2008
4
- data.tar.gz: 24ccdd3165654319b55632a866f85839268644cb32ee719f55f03de6e5f63eb6
3
+ metadata.gz: 422192af588ad4f4eb53c73fbf56ee6b8fc7dad69c5cec7dfe5a4f7b7f702b98
4
+ data.tar.gz: 413719980210e537b8c4d1958d7867224cb5743905f489680caac3261a4b60c7
5
5
  SHA512:
6
- metadata.gz: 1c90430d28fe8513dd86aef6d160e04257beb66f294b998d780c66b27d8bdb7e5320947b06894399c49bcb336795f72a338fb197f3be4626467bfb286bbde2f0
7
- data.tar.gz: 98fc07319ed605978d558777cea947a187bf3857d229b95945096d446fdbacd2637102e34a9e03afb9f5472105ce39d5d396f9c1cf8bc6f4c0677f28e6b88e9b
6
+ metadata.gz: a2ade15d59fe5fae20839c5aaa7002b3fbfc0e39373afbc7f66ddcde77f51f98451b2e5ac250147dd6cb4e0cc0cf23b234e764415a75764f53422f14f579ee74
7
+ data.tar.gz: addcd5f11bdb4a6fe4b0eaf82056fbd7aff79831a6813888e01192fe7edd094b05f83399af4c0b34370076153f7bb469bee8ca4f2c4761fd3e8ae4f022dff56f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## next
2
2
 
3
+ ## 2.4.2
4
+
5
+ *Bug fixes*
6
+
7
+ - Resolve errors for StatefulSet restart with `updateStrategy: OnDelete` [#876](https://github.com/Shopify/krane/pull/876)
8
+ - Timeouts during the "predeploy priority resources" phase now raise `DeploymentTimeoutError` instead of `FatalDeploymentError` [#874](https://github.com/Shopify/krane/pull/874)
9
+
3
10
  ## 2.4.1
4
11
 
5
12
  *Enhancements*
@@ -19,6 +19,9 @@ module Krane
19
19
  end
20
20
 
21
21
  def deploy_succeeded?
22
+ success = observed_generation == current_generation &&
23
+ desired_replicas == status_data['readyReplicas'].to_i &&
24
+ status_data['currentRevision'] == status_data['updateRevision']
22
25
  if update_strategy == ONDELETE
23
26
  # Gem cannot monitor update since it doesn't occur until delete
24
27
  unless @success_assumption_warning_shown
@@ -27,11 +30,10 @@ module Krane
27
30
  "Consider switching to rollingUpdate.")
28
31
  @success_assumption_warning_shown = true
29
32
  end
33
+ else
34
+ success &= desired_replicas == status_data['currentReplicas'].to_i
30
35
  end
31
- observed_generation == current_generation &&
32
- status_data['currentRevision'] == status_data['updateRevision'] &&
33
- desired_replicas == status_data['readyReplicas'].to_i &&
34
- desired_replicas == status_data['currentReplicas'].to_i
36
+ success
35
37
  end
36
38
 
37
39
  def deploy_failed?
@@ -70,6 +70,7 @@ module Krane
70
70
  r.sync_debug_info(kubectl)
71
71
  end
72
72
  failed_resources.each { |r| logger.summary.add_paragraph(r.debug_message) }
73
+ raise DeploymentTimeoutError if failed_resources.all?(&:deploy_timed_out?)
73
74
  raise FatalDeploymentError, "Failed to deploy #{fail_count} priority #{'resource'.pluralize(fail_count)}"
74
75
  end
75
76
  logger.blank_line
@@ -213,7 +213,7 @@ module Krane
213
213
  def delete_statefulset_pods(record)
214
214
  pods = kubeclient.get_pods(namespace: record.metadata.namespace)
215
215
  pods.select! do |pod|
216
- pod.metadata.ownerReferences.find { |ref| ref.uid == record.metadata.uid }
216
+ pod.metadata&.ownerReferences&.find { |ref| ref.uid == record.metadata.uid }
217
217
  end
218
218
  pods.each { |pod| kubeclient.delete_pod(pod.metadata.name, pod.metadata.namespace) }
219
219
  end
data/lib/krane/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Krane
3
- VERSION = "2.4.1"
3
+ VERSION = "2.4.2"
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.4.1
4
+ version: 2.4.2
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-02-02 00:00:00.000000000 Z
13
+ date: 2022-03-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport