pfab 0.8.2 → 0.8.3

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: dc9142702e1374afa5c1ffa15b7f0185147726f7e3fb923421dbf5f8ce78c698
4
- data.tar.gz: 36b623b88a071ace578571e0e8741e9f486db643f29c7d642271f42965c4c737
3
+ metadata.gz: 224ab8cfa23f3ee0a33cb46be50f3754650c99c5ebd5ba22e1671e2cf086de67
4
+ data.tar.gz: 3edfbec234d5aef944976bc296bee56018fa0b33f5a87ef3d934355e165f9033
5
5
  SHA512:
6
- metadata.gz: 99d26e436619378829efd2a44e495b6367312c332a77a89dab3c5a9b821dc4cdfbf2372a31a9476e41b860e2f9f31bbdb5b594e9c905fbbc4a709c8dc99b9f59
7
- data.tar.gz: 0d1a8ba2a7c34166cb6d3ede58b79624babf39b248c56793da798bdf3abaef880494cc1df437fca03b82b107fad4561e914bd8f74a0f2a2ec8f4c4b46dd73d82
6
+ metadata.gz: dd8954a340c7d2a2b3e603bb1dc168717c27db71b1344ba7c9ad55ca7069496da320d4fbd53cb6336dc4bebcdd795e800afab2a84cd52230b10f03985dc0c2af
7
+ data.tar.gz: 92dfb44127da6d5ba2900007e3f6f0052848dc8b2f05a043814928aa588d6627f1e20057e1ed987b374f92d52cee59e7c8d84882c644b2ad324d5ac59cc0a97e
@@ -10,7 +10,7 @@ module Pfab
10
10
 
11
11
  def run
12
12
  program :name, "pfab"
13
- program :version,Pfab::Version::STRING
13
+ program :version, Pfab::Version::STRING
14
14
  program :description, "k8s helper"
15
15
 
16
16
  if File.exist? "application.yaml"
@@ -156,11 +156,33 @@ module Pfab
156
156
  end
157
157
  alias_command :rl, :run_local
158
158
 
159
+ command :clean do |c|
160
+ c.syntax = "pfab clean"
161
+ c.summary = "clean up pods"
162
+ c.description = "clean up old pods"
163
+ c.example "clean up",
164
+ "pfab clean"
165
+ c.action do |_args, options|
166
+ set_kube_context
167
+ puts "THIS APPLIES TO THE ENTIRE NAMESPACE"
168
+ types = %w(Failed Pending Succeeded)
169
+ types.each do |type|
170
+ system("kubectl get pods --field-selector status.phase=#{type}")
171
+ if agree("Delete those?")
172
+ `kubectl delete pods --field-selector status.phase=#{type}`
173
+ puts "Deleted"
174
+ end
175
+ end
176
+ end
177
+ end
178
+ alias_command :rl, :run_local
179
+
159
180
  default_command :help
160
181
 
161
182
  run!
162
183
  end
163
184
 
185
+
164
186
  def cmd_apply
165
187
  set_kube_context
166
188
  get_apps.each do |app_name|
@@ -2,7 +2,7 @@ module Pfab
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 8
5
- PATCH = 2
5
+ PATCH = 3
6
6
  BUILD = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: pfab 0.8.2 ruby lib
5
+ # stub: pfab 0.8.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "pfab".freeze
9
- s.version = "0.8.2"
9
+ s.version = "0.8.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pfab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Dwyer