krane 3.5.0 → 3.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03c1d40b511ff2e7ad4c2e761954e547291257b2392e162fa5d85858ecc1628d
4
- data.tar.gz: 6acb35faad05f8369063c5bd4eb54b3c09789f215f0d4c8de04de46b6d6fbfbe
3
+ metadata.gz: 52cc9b71135229c675d72b67b871b4247fb473ab58805980640c126eab8c378b
4
+ data.tar.gz: 20ab95c9842ec0b7c309ad13d0246fdab355724642638198cb20dec17fbc4576
5
5
  SHA512:
6
- metadata.gz: b2fe1f07cc83ca37b75e36994e03c7b70710d0bce032d3ee385ff6a5c323e53c4a34026dfe1c087d7e606b4f5f11bd8651ac076c5726a0d83f5db7e8ad71a9b1
7
- data.tar.gz: 4a1a42234bc5cf09f9ebc1ce07994997e9c51e40d8ec236f53f26139b90bd646629d46cbbd57dfa6c1ddbb82f38c16778f1b23605cb4b8e00a2f82c2ad3eab28
6
+ metadata.gz: ccf18bf09655b599d8cf1a25c85c602713dbf3110e1acaeec7212de5fefd8b478eea26bd2b1ac4191cd48b072f07808927bb9ae668862ab7540c40ac575b7bf9
7
+ data.tar.gz: 79e18c3bd9d219924cc42dc6a9136b5d190b9c8009c3342ca2457c373749e202f78d1957bbf4c82b6cfee410a8aabe0fa008ee5fbf159e947f9bd937911ead27
@@ -5,6 +5,8 @@ on: [push]
5
5
  jobs:
6
6
  ruby-tests:
7
7
  runs-on: ubuntu-latest
8
+ env:
9
+ CI: true
8
10
 
9
11
  name: "Tests (${{matrix.test_suite}}) - Ruby ${{ matrix.ruby }} with Kubernetes ${{ matrix.kubernetes_version }}"
10
12
  strategy:
data/CHANGELOG.md CHANGED
@@ -1,20 +1,28 @@
1
1
  ## next
2
2
 
3
- # 3.5.0
3
+ ## 3.5.2
4
+
5
+ - Fixed an issue where deploying StatefulSets monitored the health of the previous revision's pods instead of the updated one.
6
+
7
+ ## 3.5.1
8
+
9
+ - Fixed successful deployment check for StatefulSets introduced in v3.3.0.
10
+
11
+ ## 3.5.0
4
12
 
5
13
  - Test against k8s 1.28
6
14
  - Drop support for k8s 1.23
7
15
 
8
- # 3.4.2
16
+ ## 3.4.2
9
17
 
10
18
  - Remove flag `--skip-dry-run` (see [#946](https://github.com/Shopify/krane/pull/946))
11
19
  - Remove support for batched server-side dry-run ([#946](https://github.com/Shopify/krane/pull/946))
12
20
 
13
- # 3.4.1
21
+ ## 3.4.1
14
22
 
15
23
  - Added flag `--skip-dry-run` to completely opt out of dry run validation.
16
24
 
17
- # 3.4.0
25
+ ## 3.4.0
18
26
 
19
27
  - 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)
20
28
 
data/Gemfile CHANGED
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
4
4
  # Specify your gem's dependencies in krane.gemspec
5
5
  gemspec
6
6
 
7
- gem "ruby-lsp", "~> 0.2.0", :group => :development
7
+ gem "ruby-lsp", "~> 0.2.0", group: :development
@@ -22,26 +22,15 @@ module Krane
22
22
  def deploy_succeeded?
23
23
  success = observed_generation == current_generation
24
24
 
25
- @pods.each do |pod|
26
- success &= pod.definition["metadata"]["labels"]["controller-revision-hash"] == status_data['updateRevision']
27
- end
28
-
29
- if update_strategy == 'RollingUpdate'
30
- success &= status_data['currentRevision'] == status_data['updateRevision']
31
- success &= desired_replicas == status_data['readyReplicas'].to_i
32
- success &= desired_replicas == status_data['currentReplicas'].to_i
33
-
34
- elsif update_strategy == ONDELETE
25
+ if update_strategy == ONDELETE && required_rollout != "full"
35
26
  unless @success_assumption_warning_shown
36
- @logger.warn("WARNING: Your StatefulSet's updateStrategy is set to OnDelete, "\
37
- "which means the deployment won't succeed until all pods are updated by deletion.")
27
+ @logger.warn("WARNING: Your StatefulSet's updateStrategy is set to #{update_strategy}, "\
28
+ "which means updates will not be applied until its pods are deleted.")
38
29
  @success_assumption_warning_shown = true
39
30
  end
40
-
41
- if required_rollout == 'full'
42
- success &= desired_replicas == status_data['readyReplicas'].to_i
43
- success &= desired_replicas == status_data['updatedReplicas'].to_i
44
- end
31
+ else
32
+ success &= desired_replicas == status_data['readyReplicas'].to_i
33
+ success &= desired_replicas == status_data['updatedReplicas'].to_i
45
34
  end
46
35
 
47
36
  success
@@ -76,7 +65,7 @@ module Krane
76
65
  def parent_of_pod?(pod_data)
77
66
  return false unless pod_data.dig("metadata", "ownerReferences")
78
67
  pod_data["metadata"]["ownerReferences"].any? { |ref| ref["uid"] == @instance_data["metadata"]["uid"] } &&
79
- @instance_data["status"]["currentRevision"] == pod_data["metadata"]["labels"]["controller-revision-hash"]
68
+ @instance_data["status"]["updateRevision"] == pod_data["metadata"]["labels"]["controller-revision-hash"]
80
69
  end
81
70
 
82
71
  def required_rollout
data/lib/krane/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Krane
3
- VERSION = "3.5.0"
3
+ VERSION = "3.5.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: 3.5.0
4
+ version: 3.5.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: 2024-02-08 00:00:00.000000000 Z
13
+ date: 2024-04-22 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.5.6
528
+ rubygems_version: 3.5.9
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