kubernetes-deploy 0.9.0 → 0.9.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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/README.md +1 -1
- data/lib/kubernetes-deploy/deferred_summary_logging.rb +1 -1
- data/lib/kubernetes-deploy/kubernetes_resource/pod.rb +2 -1
- data/lib/kubernetes-deploy/kubernetes_resource/service.rb +9 -3
- data/lib/kubernetes-deploy/runner.rb +1 -2
- data/lib/kubernetes-deploy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10f350d410bd5c15f27b68c18e35c63d8a8ac361
|
4
|
+
data.tar.gz: b1dea0ec0e6638bb91b38f73dcf06eae69435ad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44d974d7f3c78403c43fa8682a1177a806fe675836733412d5ca59d7bb732decce7b38a4fe32c6f8e49bf41eb396265a61b50dd53cadf570677dabd404dd4148
|
7
|
+
data.tar.gz: 765a27bf59e8575df9e8cd469535935f74c538d7a4d543ccdb2c695b189300f8403d2019cc5edfa3c2cf29ef137cff4e7e17bf12cbe8d2096a15f56cbaace1ea
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# kubernetes-deploy [](https://buildkite.com/shopify/kubernetes-deploy-gem)
|
1
|
+
# kubernetes-deploy [](https://buildkite.com/shopify/kubernetes-deploy-gem) [](https://codecov.io/gh/Shopify/kubernetes-deploy)
|
2
2
|
|
3
3
|
`kubernetes-deploy` is a command line tool that helps you ship changes to a Kubernetes namespace and understand the result. At Shopify, we use it within our much-beloved, open-source [Shipit](https://github.com/Shopify/shipit-engine#kubernetes) deployment app.
|
4
4
|
|
@@ -71,7 +71,7 @@ module KubernetesDeploy
|
|
71
71
|
# Example:
|
72
72
|
# # The resulting summary will begin with "Created 3 secrets and failed to deploy 2 resources"
|
73
73
|
# @logger.summary.add_action("created 3 secrets")
|
74
|
-
# @logger.summary.
|
74
|
+
# @logger.summary.add_action("failed to deploy 2 resources")
|
75
75
|
def add_action(sentence_fragment)
|
76
76
|
@actions_taken << sentence_fragment
|
77
77
|
end
|
@@ -184,7 +184,8 @@ module KubernetesDeploy
|
|
184
184
|
"Failed to start (exit #{exit_code}): #{@status['lastState']['terminated']['message']}"
|
185
185
|
elsif limbo_reason == "CrashLoopBackOff"
|
186
186
|
"Crashing repeatedly (exit #{exit_code}). See logs for more information."
|
187
|
-
elsif %w(ImagePullBackOff ErrImagePull).include?(limbo_reason) &&
|
187
|
+
elsif %w(ImagePullBackOff ErrImagePull).include?(limbo_reason) &&
|
188
|
+
limbo_message.match(/(?:not found)|(?:back-off)/i)
|
188
189
|
"Failed to pull image #{@image}. "\
|
189
190
|
"Did you wait for it to be built and pushed to the registry before deploying?"
|
190
191
|
elsif limbo_message == "Generate Container Config Failed"
|
@@ -7,10 +7,16 @@ module KubernetesDeploy
|
|
7
7
|
_, _err, st = kubectl.run("get", type, @name)
|
8
8
|
@found = st.success?
|
9
9
|
@related_deployment_replicas = fetch_related_replica_count
|
10
|
-
@
|
11
|
-
|
12
|
-
|
10
|
+
@num_pods_selected = fetch_related_pod_count
|
11
|
+
end
|
12
|
+
|
13
|
+
def status
|
14
|
+
if @num_pods_selected.blank?
|
13
15
|
"Failed to count related pods"
|
16
|
+
elsif selects_some_pods?
|
17
|
+
"Selects at least 1 pod"
|
18
|
+
else
|
19
|
+
"Selects 0 pods"
|
14
20
|
end
|
15
21
|
end
|
16
22
|
|
@@ -157,7 +157,6 @@ module KubernetesDeploy
|
|
157
157
|
|
158
158
|
if success_count > 0
|
159
159
|
@logger.summary.add_action("successfully deployed #{success_count} #{'resource'.pluralize(success_count)}")
|
160
|
-
successful_resources.map(&:sync) # make sure we're printing the latest on resources that succeeded early
|
161
160
|
final_statuses = successful_resources.map(&:pretty_status).join("\n")
|
162
161
|
@logger.summary.add_paragraph("#{ColorizedString.new('Successful resources').green}\n#{final_statuses}")
|
163
162
|
end
|
@@ -417,7 +416,7 @@ module KubernetesDeploy
|
|
417
416
|
return unless pruned.present?
|
418
417
|
|
419
418
|
@logger.info("The following resources were pruned: #{pruned.join(', ')}")
|
420
|
-
@logger.summary.add_action("pruned #{pruned.length}
|
419
|
+
@logger.summary.add_action("pruned #{pruned.length} #{'resource'.pluralize(pruned.length)}")
|
421
420
|
end
|
422
421
|
|
423
422
|
def confirm_context_exists
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kubernetes-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katrina Verey
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-07-
|
12
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|