krane 3.4.0 → 3.4.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 +4 -4
- data/.github/workflows/ci.yml +7 -2
- data/CHANGELOG.md +9 -0
- data/bin/test +15 -8
- data/lib/krane/deploy_task.rb +1 -11
- data/lib/krane/resource_deployer.rb +0 -7
- data/lib/krane/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9af2989b818a90b912ff0be766da947ba16069bf80c37af1fbe796035e09639
|
|
4
|
+
data.tar.gz: ee50f25e7c6978f00b9fe3db89a1eae508cfc5d5537af3eed34f7de8686d39c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7b8f745d709a8a06b8abfa3733df4dc897ea46e019d0d4edba80cbaf46a315697491dd27a75ccc876965d3e42d4cad58f7b1ed98b6d1ba1902ec71e0edf0969
|
|
7
|
+
data.tar.gz: 804e293dd895cee5a1aaa48b0509ff46dd039fafad7aadcfcb7f97e61cef9490dc745a77f4fb9a38f0627c09c29864f53a493451a9e8fdfe1b1d6c78a2c43386
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -6,7 +6,7 @@ jobs:
|
|
|
6
6
|
ruby-tests:
|
|
7
7
|
runs-on: ubuntu-latest
|
|
8
8
|
|
|
9
|
-
name: "Tests - Ruby ${{ matrix.ruby }} with Kubernetes ${{ matrix.kubernetes_version }}"
|
|
9
|
+
name: "Tests (${{matrix.test_suite}}) - Ruby ${{ matrix.ruby }} with Kubernetes ${{ matrix.kubernetes_version }}"
|
|
10
10
|
strategy:
|
|
11
11
|
fail-fast: false
|
|
12
12
|
matrix:
|
|
@@ -20,6 +20,11 @@ jobs:
|
|
|
20
20
|
- "1.26.4"
|
|
21
21
|
- "1.24.13"
|
|
22
22
|
- "1.23.17"
|
|
23
|
+
test_suite:
|
|
24
|
+
- "unit_test"
|
|
25
|
+
- "cli_test"
|
|
26
|
+
- "serial_integration_test"
|
|
27
|
+
- "integration_test"
|
|
23
28
|
include:
|
|
24
29
|
- kubernetes_version: "1.27.3"
|
|
25
30
|
kind_image: "kindest/node:v1.27.3@sha256:9dd3392d79af1b084671b05bcf65b21de476256ad1dcc853d9f3b10b4ac52dde"
|
|
@@ -52,4 +57,4 @@ jobs:
|
|
|
52
57
|
|
|
53
58
|
- name: Run tests
|
|
54
59
|
run: |
|
|
55
|
-
bin/test
|
|
60
|
+
bin/test ${{matrix.test_suite}}
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
## next
|
|
2
2
|
|
|
3
|
+
# 3.4.2
|
|
4
|
+
|
|
5
|
+
- Remove flag `--skip-dry-run` (see [#946](https://github.com/Shopify/krane/pull/946))
|
|
6
|
+
- Remove support for batched server-side dry-run ([#946](https://github.com/Shopify/krane/pull/946))
|
|
7
|
+
|
|
8
|
+
# 3.4.1
|
|
9
|
+
|
|
10
|
+
- Added flag `--skip-dry-run` to completely opt out of dry run validation.
|
|
11
|
+
|
|
3
12
|
# 3.4.0
|
|
4
13
|
|
|
5
14
|
- 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)
|
data/bin/test
CHANGED
|
@@ -33,16 +33,23 @@ if [[ "${CI:-0}" != "0" ]]; then
|
|
|
33
33
|
PARALLELISM=2
|
|
34
34
|
fi
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
bundle exec rake cli_test
|
|
36
|
+
test_type=$1
|
|
38
37
|
|
|
39
|
-
print_header "Run Unit Tests"
|
|
40
|
-
bundle exec rake unit_test
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
case $test_type in
|
|
40
|
+
cli_test | unit_test | serial_integration_test)
|
|
41
|
+
print_header $test_type
|
|
42
|
+
bundle exec rake $test_type
|
|
43
|
+
;;
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
integration_test)
|
|
46
|
+
print_header "Run Parallel Integration Tests (MT_CPU=$PARALLELISM)"
|
|
47
|
+
PARALLELIZE_ME=1 MT_CPU=$PARALLELISM bundle exec rake integration_test
|
|
48
|
+
;;
|
|
49
|
+
|
|
50
|
+
*)
|
|
51
|
+
echo "Argument must be one of: unit_test, cli_test, serial_integration_test, integration_test"
|
|
52
|
+
;;
|
|
53
|
+
esac
|
|
47
54
|
|
|
48
55
|
test $err -eq 0
|
data/lib/krane/deploy_task.rb
CHANGED
|
@@ -286,15 +286,9 @@ module Krane
|
|
|
286
286
|
|
|
287
287
|
def validate_resources(resources)
|
|
288
288
|
validate_globals(resources)
|
|
289
|
-
batch_dry_run_success = validate_dry_run(resources)
|
|
290
289
|
resources.select! { |r| r.selected?(@selector) } if @selector_as_filter
|
|
291
290
|
Krane::Concurrency.split_across_threads(resources) do |r|
|
|
292
|
-
|
|
293
|
-
if batch_dry_run_success
|
|
294
|
-
r.validate_definition(kubectl: nil, selector: @selector, dry_run: false)
|
|
295
|
-
else
|
|
296
|
-
r.validate_definition(kubectl: kubectl, selector: @selector, dry_run: true)
|
|
297
|
-
end
|
|
291
|
+
r.validate_definition(kubectl: kubectl, selector: @selector, dry_run: true)
|
|
298
292
|
end
|
|
299
293
|
failed_resources = resources.select(&:validation_failed?)
|
|
300
294
|
if failed_resources.present?
|
|
@@ -320,10 +314,6 @@ module Krane
|
|
|
320
314
|
"Use GlobalDeployTask instead."
|
|
321
315
|
end
|
|
322
316
|
|
|
323
|
-
def validate_dry_run(resources)
|
|
324
|
-
resource_deployer.dry_run(resources)
|
|
325
|
-
end
|
|
326
|
-
|
|
327
317
|
def namespace_definition
|
|
328
318
|
@namespace_definition ||= begin
|
|
329
319
|
definition, _err, st = kubectl.run("get", "namespace", @namespace, use_namespace: false,
|
|
@@ -20,13 +20,6 @@ module Krane
|
|
|
20
20
|
@statsd_tags = statsd_tags
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def dry_run(resources)
|
|
24
|
-
apply_all(resources, true, dry_run: true)
|
|
25
|
-
true
|
|
26
|
-
rescue FatalDeploymentError
|
|
27
|
-
false
|
|
28
|
-
end
|
|
29
|
-
|
|
30
23
|
def deploy!(resources, verify_result, prune)
|
|
31
24
|
if verify_result
|
|
32
25
|
deploy_all_resources(resources, prune: prune, verify: true)
|
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: 3.4.
|
|
4
|
+
version: 3.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:
|
|
13
|
+
date: 2024-01-30 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.
|
|
528
|
+
rubygems_version: 3.5.5
|
|
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
|