krane 2.4.3 → 2.4.6

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: 56b75748b54eff6f26c64869117e2ec648569a019e77068f13766ce5b371aab7
4
- data.tar.gz: c0d9cb8a202f7a2ccdc0975e7447373bf725705af25ba2f799b02efc9a55ddcc
3
+ metadata.gz: 3efffadcb3741041089702a861ec5895261b3a47a4b3bee3ab2290f2d47b237e
4
+ data.tar.gz: fd9d8eda29c43146a4754e55321e0546244ef79ce67d534895b5c159b55399e2
5
5
  SHA512:
6
- metadata.gz: 3e070999eba8cde1d8a9bc89b77643ef957c234f572a7537b060bac6b2664ea7b8efe9d765aa516b98aaad9ce0cde1e3cb47e5e260d3be4d64a9533a303fdb54
7
- data.tar.gz: 6bf1e6adc954c2531f8d871872c5ac352aeb5359abfefd690ad42b289ebd35456fb75f6a69ccc733675134a44f670844f565d82726ac589480fc2c0e319c979f
6
+ metadata.gz: e5f7a84718bf3be365a9947cbb7124f2ca6df5967dd39694ce0882bbfd620e488e91610ccc284d33a04d0af2471b3fc11f42b79853db0c20e87b6babc69adeb2
7
+ data.tar.gz: 57ed1f07880d46fd2bf5388bb7ae9bb3bb5f50aa4ec001e7d095d9cadf66e01952f0082bc3bd3f0115dcab3afa531f07d709404c6cfcafc93941a48a55941fbb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  ## next
2
2
 
3
+ ## 2.4.6
4
+
5
+ *Bug fixes*
6
+
7
+ - Extend [#886](https://github.com/Shopify/krane/pull/886) to not only secrets but anything that doesn't match `failed to sync %s cache` [#886](https://github.com/Shopify/krane/pull/886)
8
+ It seems an issue when too many pods are referencing the same secret/configmap https://github.com/kubernetes/kubernetes/pull/74755, so instead of failing fast, it'll now let the resources attempt to succeed.
9
+ - Add missing unit test for above feature.
10
+
11
+ ## 2.4.5
12
+
13
+ *Bug fixes*
14
+
15
+ - Do not fail fast for CreateContainerConfigError when message include issues mounting the secret, to let the pods be recreated and possible succeed [#885](https://github.com/Shopify/krane/pull/885)
16
+
17
+ ## 2.4.4
18
+
19
+ *Enhancements*
20
+
21
+ - Improve DaemonSet rollout by ignoring `Evicted` Pods [#883](https://github.com/Shopify/krane/pull/883)
22
+
3
23
  ## 2.4.3
4
24
 
5
25
  *Enhancements*
@@ -59,7 +59,7 @@ module Krane
59
59
  def relevant_pods_ready?
60
60
  return true if rollout_data["desiredNumberScheduled"].to_i == rollout_data["numberReady"].to_i # all pods ready
61
61
  relevant_node_names = @nodes.map(&:name)
62
- considered_pods = @pods.select { |p| relevant_node_names.include?(p.node_name) }
62
+ considered_pods = @pods.select { |p| relevant_node_names.include?(p.node_name) && !p.evicted? }
63
63
  @logger.debug("DaemonSet is reporting #{rollout_data['numberReady']} pods ready." \
64
64
  " Considered #{considered_pods.size} pods out of #{@pods.size} for #{@nodes.size} nodes.")
65
65
  considered_pods.present? &&
@@ -105,6 +105,10 @@ module Krane
105
105
  @instance_data.dig('spec', 'nodeName')
106
106
  end
107
107
 
108
+ def evicted?
109
+ phase == "Failed" && reason == "Evicted"
110
+ end
111
+
108
112
  private
109
113
 
110
114
  def failed_schedule_reason
@@ -225,7 +229,11 @@ module Krane
225
229
  elsif limbo_reason == "ErrImagePull" && limbo_message.match(/not found/i)
226
230
  "Failed to pull image #{@image}. "\
227
231
  "Did you wait for it to be built and pushed to the registry before deploying?"
228
- elsif limbo_reason == "CreateContainerConfigError"
232
+ # Only fail fast when message doesn't include `failed to sync %s cache`.
233
+ # It's possible that a secret/configmap is still trying to be mounted to the pod, it seems related
234
+ # to too many pods referencing the same secret/configmap: https://github.com/kubernetes/kubernetes/pull/74755
235
+ # Error message format source: https://github.com/kubernetes/kubernetes/pull/75260
236
+ elsif limbo_reason == "CreateContainerConfigError" && !limbo_message.match("failed to sync (.*?) cache")
229
237
  "Failed to generate container configuration: #{limbo_message}"
230
238
  elsif @status.dig("lastState", "terminated", "reason") == "ContainerCannotRun"
231
239
  # ref: https://github.com/kubernetes/kubernetes/blob/562e721ece8a16e05c7e7d6bdd6334c910733ab2/pkg/kubelet/dockershim/docker_container.go#L353
data/lib/krane/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Krane
3
- VERSION = "2.4.3"
3
+ VERSION = "2.4.6"
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.3
4
+ version: 2.4.6
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-03-31 00:00:00.000000000 Z
13
+ date: 2022-04-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport