kubernetes-deploy 0.8.1 → 0.8.2

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
  SHA1:
3
- metadata.gz: 0a6a0a8232035518d42b8dd709c236df5ee436bb
4
- data.tar.gz: b1e8c26dc53fe92a2e22bec894badc46c2e292f4
3
+ metadata.gz: d9ad1fea429ff09ad76f943268e282f118187bcf
4
+ data.tar.gz: 2f97506d2a4c07a2c21702dbfbc9586785efa303
5
5
  SHA512:
6
- metadata.gz: d94033e6774153f24ddbee8fa6e560636ba091cbc3e5a6ac24cab07dc2ac0ed2132d1ce6d5a5a60529e2d309e2589bf42e24c55893a7b48aa034d042afdfcb74
7
- data.tar.gz: ef4456ba9e4303a70af71dbf36f63c5a4a4b24c31fa556b34f968dcc59e543c51fe937e4a084b85c4fb659033e8711125d98e637909fa92e89259fbc5a426367
6
+ metadata.gz: 5057c2c5ffcb7ddc6891cabc150e4f27028c8d75ecbcd5e46a56ffe87f7d61d731597e26d4bd23a989dc07fbf11bdea75efda55c61d08357d2a9f538eaf74553
7
+ data.tar.gz: 913bed4cd01a854b2a2b39cde61582e409be306a9309f4708d8d46eb9c03f6ddf2e1f7bad1f0a54900d742333abc85d1f5395813ff4a51902c521887d2018150
data/README.md CHANGED
@@ -18,7 +18,9 @@ Especially in a CI/CD environment, we need a clear, actionable pass/fail result
18
18
 
19
19
  This repo also includes related tools for [running tasks](#kubernetes-run) and [restarting deployments](#kubernetes-restart).
20
20
 
21
- ![success](screenshots/success.png)
21
+
22
+
23
+ ![demo-deploy.gif](screenshots/deploy-demo.gif)
22
24
 
23
25
 
24
26
 
@@ -96,11 +98,11 @@ This repo also includes related tools for [running tasks](#kubernetes-run) and [
96
98
 
97
99
  *Options:*
98
100
 
101
+ Refer to `kubernetes-deploy --help` for the authoritative set of options.
102
+
103
+ - `--template-dir=DIR`: Used to set the deploy directory. Set `$ENVIRONMENT` instead to use `config/deploy/$ENVIRONMENT`.
99
104
  - `--bindings=BINDINGS`: Makes additional variables available to your ERB templates. For example, `kubernetes-deploy my-app cluster1 --bindings=color=blue,size=large` will expose `color` and `size`.
100
- - `--verbose-log-prefix`: Prefixes each log line with `[#{context}][#{namespace}][#{severity}][#{datetime}]` instead of just `[#{severity}][#{datetime}]`. Useful if you're running multiple concurrent deploys in Shipit.
101
- - `--allow-protected-ns`: Enables you to deploy to `default`, `kube-system` or `kube-public` if you really know what you're doing. Must be used with `--no-prune` (pruning a protected namespace cannot be enabled).
102
105
  - `--no-prune`: Skips pruning of resources that are no longer in your Kubernetes template set. Not recommended, as it allows your namespace to accumulate cruft that is not reflected in your deploy directory.
103
- - `--skip-wait`: Verifies the result of predeployed resources only. Declares success immediately after the bulk `kubectl apply` operation. Not recommended, as it skips a huge part of the value of this tool.
104
106
 
105
107
 
106
108
 
@@ -12,7 +12,7 @@ bindings = {}
12
12
  verbose_log_prefix = false
13
13
 
14
14
  ARGV.options do |opts|
15
- opts.on("--bindings=BINDINGS", Array, "k1=v1,k2=v2") do |binds|
15
+ opts.on("--bindings=BINDINGS", Array, "Expose additional variables to ERB templates (format: k1=v1,k2=v2)") do |binds|
16
16
  bindings = binds.each_with_object({}) do |bind, acc|
17
17
  k, v = bind.split('=')
18
18
  raise "key for value #{v} is blank!" if k.blank?
@@ -21,11 +21,21 @@ ARGV.options do |opts|
21
21
  end
22
22
  end
23
23
 
24
- opts.on("--skip-wait") { skip_wait = true }
25
- opts.on("--allow-protected-ns") { allow_protected_ns = true }
26
- opts.on("--no-prune") { prune = false }
27
- opts.on("--template-dir=DIR") { |v| template_dir = v }
28
- opts.on("--verbose-log-prefix") { verbose_log_prefix = true }
24
+ opts.on("--skip-wait", "Skip verification of non-priority-resource success (not recommended)") { skip_wait = true }
25
+ prot_ns = KubernetesDeploy::Runner::PROTECTED_NAMESPACES.join(', ')
26
+ opts.on("--allow-protected-ns", "Enable deploys to #{prot_ns}; requires --no-prune") { allow_protected_ns = true }
27
+ opts.on("--no-prune", "Disable deletion of resources that do not appear in the template dir") { prune = false }
28
+ opts.on("--template-dir=DIR", "Set the template dir (default: config/deploy/$ENVIRONMENT)") { |v| template_dir = v }
29
+ opts.on("--verbose-log-prefix", "Add [context][namespace] to the log prefix") { verbose_log_prefix = true }
30
+
31
+ opts.on_tail("-h", "--help", "Print this help") do
32
+ puts opts
33
+ exit
34
+ end
35
+ opts.on_tail("-v", "--version", "Show version") do
36
+ puts "v#{KubernetesDeploy::VERSION}"
37
+ exit
38
+ end
29
39
  opts.parse!
30
40
  end
31
41
 
@@ -10,6 +10,7 @@ require 'active_support/core_ext/hash/keys'
10
10
  require 'active_support/core_ext/array/conversions'
11
11
  require 'colorized_string'
12
12
 
13
+ require 'kubernetes-deploy/version'
13
14
  require 'kubernetes-deploy/errors'
14
15
  require 'kubernetes-deploy/formatted_logger'
15
16
  require 'kubernetes-deploy/runner'
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  module KubernetesDeploy
3
3
  class Deployment < KubernetesResource
4
- TIMEOUT = 5.minutes
4
+ TIMEOUT = 7.minutes
5
5
 
6
6
  def sync
7
7
  raw_json, _err, st = kubectl.run("get", type, @name, "--output=json")
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  module KubernetesDeploy
3
3
  class Service < KubernetesResource
4
- TIMEOUT = 5.minutes
4
+ TIMEOUT = 7.minutes
5
5
 
6
6
  def sync
7
7
  _, _err, st = kubectl.run("get", type, @name)
@@ -1,3 +1,3 @@
1
1
  module KubernetesDeploy
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
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.8.1
4
+ version: 0.8.2
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-11 00:00:00.000000000 Z
12
+ date: 2017-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -228,6 +228,7 @@ files:
228
228
  - lib/kubernetes-deploy/runner_task.rb
229
229
  - lib/kubernetes-deploy/statsd.rb
230
230
  - lib/kubernetes-deploy/version.rb
231
+ - screenshots/deploy-demo.gif
231
232
  - screenshots/migrate-logs.png
232
233
  - screenshots/missing-secret-fail.png
233
234
  - screenshots/success.png