krane 3.5.3 → 3.6.1

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: af0a06d99b0fc63d756c43fc6eb172e8f8740593b82f9796606cc4a991e5fdd2
4
- data.tar.gz: 2dc66222f165edd14b610f95cf222c46b37a4ba329facb91af5459bceed84908
3
+ metadata.gz: d78cc316978de660c325dc26a7e6857b4b0c622537558929a769c282007203ce
4
+ data.tar.gz: a8ff6c78f240824244b77ada8f4e835576cd42a97955c4113edb8369feedc086
5
5
  SHA512:
6
- metadata.gz: 2372c3bdc698d592f732e7bff2ef5d7a0b44d9d4bd062eeb5ea65e5fc18f5e5cf52f54e3a43bfcdd07d7b1793afc8ce5ca7b34275a6e0d4c2edf7465d4c4d7aa
7
- data.tar.gz: 5db1734d216135fb0655e8c979c216c9d3adfa7c09f1e336594603b466b818dd4db3acdb5a90b86fb46d947e283a0bf207bee824a5dd31bea2e1c599bea2df90
6
+ metadata.gz: cea17bc39a0fafc26dc2fd0a0de0c5091e4efdd444548559516136d7cde0b10003b30ce924b65859e89e711f7379d64815e89e98b8bfbf55c82b98ec2c8883ca
7
+ data.tar.gz: d4d3a0aade84bc17a7add8f11bb436820ad0f6f36202a9bf96b9ca80847291c885d6f249a77ea002efa6b9a4e80bd14b8797247eefb82e8a6d7a528e5db95a91
@@ -0,0 +1,22 @@
1
+ version: 2
2
+ registries:
3
+ ruby-shopify:
4
+ type: rubygems-server
5
+ url: https://pkgs.shopify.io/basic/gems/ruby
6
+ username: ${{secrets.RUBYGEMS_SERVER_PKGS_SHOPIFY_IO_USERNAME}}
7
+ password: ${{secrets.RUBYGEMS_SERVER_PKGS_SHOPIFY_IO_PASSWORD}}
8
+ github-com:
9
+ type: git
10
+ url: https://github.com
11
+ username: ${{secrets.DEPENDENCIES_GITHUB_USER}}
12
+ password: ${{secrets.DEPENDENCIES_GITHUB_TOKEN}}
13
+ updates:
14
+ - package-ecosystem: bundler
15
+ directory: "/"
16
+ schedule:
17
+ interval: "weekly"
18
+ time: "10:00"
19
+ timezone: "America/Toronto"
20
+ open-pull-requests-limit: 100
21
+ insecure-external-code-execution: allow
22
+ registries: "*"
@@ -18,24 +18,27 @@ jobs:
18
18
  - "3.0.4"
19
19
  - "2.7.6"
20
20
  kubernetes_version:
21
+ - "1.30.0"
22
+ - "1.29.4"
21
23
  - "1.28.0"
22
24
  - "1.27.3"
23
25
  - "1.26.4"
24
- - "1.24.13"
25
26
  test_suite:
26
27
  - "unit_test"
27
28
  - "cli_test"
28
29
  - "serial_integration_test"
29
30
  - "integration_test"
30
31
  include:
32
+ - kubernetes_version: "1.30.0"
33
+ kind_image: "kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e"
34
+ - kubernetes_version: "1.29.4"
35
+ kind_image: "kindest/node:v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8"
31
36
  - kubernetes_version: "1.28.0"
32
37
  kind_image: "kindest/node:v1.28.0@sha256:dad5a6238c5e41d7cac405fae3b5eda2ad1de6f1190fa8bfc64ff5bb86173213"
33
38
  - kubernetes_version: "1.27.3"
34
39
  kind_image: "kindest/node:v1.27.3@sha256:9dd3392d79af1b084671b05bcf65b21de476256ad1dcc853d9f3b10b4ac52dde"
35
40
  - kubernetes_version: "1.26.4"
36
41
  kind_image: "kindest/node:v1.26.4@sha256:a539833d26264444ab3b8f5e56e23fa3361436445fa23c864e6dec622458858f"
37
- - kubernetes_version: "1.24.13"
38
- kind_image: "kindest/node:v1.24.13@sha256:c9e00e2b228e47ba3c96eaf0309b27dc3f73e444944e4c900016fd07b1b805cb"
39
42
 
40
43
  steps:
41
44
  - uses: actions/checkout@v3
data/.gitignore CHANGED
@@ -9,7 +9,6 @@
9
9
  /tmp/
10
10
 
11
11
  .byebug_history
12
- .ruby-version
13
12
  coverage/*
14
13
  dev/flamegraph.svg
15
14
  dev/profile
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  ## next
2
2
 
3
+ ## 3.6.1
4
+
5
+ *Features*
6
+
7
+ - Enable the option to bypass endpoint validation for a service by using the annotation `krane.shopify.io/skip-endpoint-validation: true`.
8
+
9
+ ## 3.6.0
10
+
11
+ - Test against k8s 1.29, 1.30
12
+ - Drop support for k8s 1.24
13
+
3
14
  ## 3.5.3
4
15
 
5
16
  - Fix a minor bug in the RestartAPIError class (https://github.com/Shopify/krane/pull/953)
data/CONTRIBUTING.md CHANGED
@@ -111,7 +111,7 @@ This gem uses subclasses of `KubernetesResource` to implement custom success/fai
111
111
 
112
112
  If you work for Shopify, just run `dev up`, but otherwise:
113
113
 
114
- 1. [Install kubectl version 1.22.0 or higher](https://kubernetes.io/docs/user-guide/prereqs/) and make sure it is in your path
114
+ 1. [Install kubectl version 1.28.0 or higher](https://kubernetes.io/docs/user-guide/prereqs/) and make sure it is in your path
115
115
  2. [Install minikube](https://kubernetes.io/docs/getting-started-guides/minikube/#installation) (required to run the test suite)
116
116
  3. [Install any required minikube drivers](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md) (on OS X, you may need the [hyperkit driver](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver)
117
117
  4. Check out the repo
data/README.md CHANGED
@@ -90,15 +90,17 @@ Krane provides support for official upstream supported versions [Kubernetes](htt
90
90
  | 1.21 | No | 2.4.9 |
91
91
  | 1.22 | No | 3.0.1 |
92
92
  | 1.23 | No | 3.4.2 |
93
- | 1.24 | Yes | -- |
93
+ | 1.24 | No | 3.5.3 |
94
94
  | 1.25 | No | -- |
95
95
  | 1.26 | Yes | -- |
96
96
  | 1.27 | Yes | -- |
97
97
  | 1.28 | Yes | -- |
98
+ | 1.29 | Yes | -- |
99
+ | 1.30 | Yes | -- |
98
100
 
99
101
  ## Installation
100
102
 
101
- 1. [Install kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-via-curl) (requires v1.22.0 or higher) and make sure it is available in your $PATH
103
+ 1. [Install kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-via-curl) (requires v1.28.0 or higher) and make sure it is available in your $PATH
102
104
  2. Set up your [kubeconfig file](https://kubernetes.io/docs/tasks/access-application-cluster/authenticate-across-clusters-kubeconfig/) for access to your cluster(s).
103
105
  3. `gem install krane`
104
106
 
@@ -174,6 +176,10 @@ before the deployment is considered successful.
174
176
  - _Accepted values_: `create`, `replace`, and `replace-force`
175
177
  - _Warning_: Resources whose deploy method is overridden are no longer subject to pruning on deploy.
176
178
  - This feature is _experimental_ and may be removed at any time.
179
+ - `krane.shopify.io/skip-endpoint-validation`: Skip endpoint validation for the service.
180
+ - _Compatibility_: Service
181
+ - _Default_: `false`
182
+ - `true`: Endpoint validation is not performed during the deployment of the service.
177
183
 
178
184
 
179
185
  ### Running tasks at the beginning of a deploy
data/dev.yml CHANGED
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: krane
3
3
  up:
4
- - ruby: '3.2.2' # Matches gemspec
4
+ - ruby
5
5
  - bundler
6
6
  - podman
7
7
  - kind:
8
8
  name: krane
9
- image: kindest/node:v1.26.4@sha256:354b7b57f16dc42d5ccc8c7eb3c3c8b3818531d35bc82600ba874a85fa1fa28a
9
+ image: kindest/node:v1.28.0@sha256:dad5a6238c5e41d7cac405fae3b5eda2ad1de6f1190fa8bfc64ff5bb86173213
10
10
  commands:
11
11
  test:
12
12
  run: bin/test
@@ -5,6 +5,7 @@ module Krane
5
5
  class Service < KubernetesResource
6
6
  TIMEOUT = 7.minutes
7
7
  SYNC_DEPENDENCIES = %w(Pod Deployment StatefulSet)
8
+ SKIP_ENDPOINT_VALIDATION_ANNOTATION = 'skip-endpoint-validation'
8
9
 
9
10
  def sync(cache)
10
11
  super
@@ -59,6 +60,9 @@ module Krane
59
60
  end
60
61
 
61
62
  def requires_endpoints?
63
+ # skip validation if the annotation is present
64
+ return false if skip_endpoint_validation
65
+
62
66
  # services of type External don't have endpoints
63
67
  return false if external_name_svc?
64
68
 
@@ -96,5 +100,9 @@ module Krane
96
100
  def published?
97
101
  @instance_data.dig('status', 'loadBalancer', 'ingress').present?
98
102
  end
103
+
104
+ def skip_endpoint_validation
105
+ krane_annotation_value(SKIP_ENDPOINT_VALIDATION_ANNOTATION) == 'true'
106
+ end
99
107
  end
100
108
  end
data/lib/krane/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Krane
3
- VERSION = "3.5.3"
3
+ VERSION = "3.6.1"
4
4
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: krane
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.3
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Verey
8
8
  - Daniel Turner
9
9
  - Kir Shatrov
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2024-05-07 00:00:00.000000000 Z
13
+ date: 2024-08-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -413,6 +413,7 @@ extra_rdoc_files: []
413
413
  files:
414
414
  - ".github/CODEOWNERS"
415
415
  - ".github/ISSUE_TEMPLATE.md"
416
+ - ".github/dependabot.yml"
416
417
  - ".github/pull_request_template.md"
417
418
  - ".github/workflows/add-to-project.yml"
418
419
  - ".github/workflows/ci.yml"
@@ -420,6 +421,7 @@ files:
420
421
  - ".gitignore"
421
422
  - ".rubocop-http---shopify-github-io-ruby-style-guide-rubocop-yml"
422
423
  - ".rubocop.yml"
424
+ - ".ruby-version"
423
425
  - 1.0-Upgrade.md
424
426
  - CHANGELOG.md
425
427
  - CODE_OF_CONDUCT.md
@@ -510,7 +512,7 @@ licenses:
510
512
  - MIT
511
513
  metadata:
512
514
  allowed_push_host: https://rubygems.org
513
- post_install_message:
515
+ post_install_message:
514
516
  rdoc_options: []
515
517
  require_paths:
516
518
  - lib
@@ -525,8 +527,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
525
527
  - !ruby/object:Gem::Version
526
528
  version: '0'
527
529
  requirements: []
528
- rubygems_version: 3.5.10
529
- signing_key:
530
+ rubygems_version: 3.5.16
531
+ signing_key:
530
532
  specification_version: 4
531
533
  summary: A command line tool that helps you ship changes to a Kubernetes namespace
532
534
  and understand the result