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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/krane/kubernetes_resource/stateful_set.rb +6 -4
- data/lib/krane/resource_deployer.rb +1 -0
- data/lib/krane/restart_task.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: 422192af588ad4f4eb53c73fbf56ee6b8fc7dad69c5cec7dfe5a4f7b7f702b98
|
4
|
+
data.tar.gz: 413719980210e537b8c4d1958d7867224cb5743905f489680caac3261a4b60c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/krane/restart_task.rb
CHANGED
@@ -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
|
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
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.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-
|
13
|
+
date: 2022-03-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|