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 +4 -4
- data/lib/pfab/cli.rb +23 -1
- data/lib/pfab/version.rb +1 -1
- data/pfab.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 224ab8cfa23f3ee0a33cb46be50f3754650c99c5ebd5ba22e1671e2cf086de67
|
4
|
+
data.tar.gz: 3edfbec234d5aef944976bc296bee56018fa0b33f5a87ef3d934355e165f9033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd8954a340c7d2a2b3e603bb1dc168717c27db71b1344ba7c9ad55ca7069496da320d4fbd53cb6336dc4bebcdd795e800afab2a84cd52230b10f03985dc0c2af
|
7
|
+
data.tar.gz: 92dfb44127da6d5ba2900007e3f6f0052848dc8b2f05a043814928aa588d6627f1e20057e1ed987b374f92d52cee59e7c8d84882c644b2ad324d5ac59cc0a97e
|
data/lib/pfab/cli.rb
CHANGED
@@ -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|
|
data/lib/pfab/version.rb
CHANGED
data/pfab.gemspec
CHANGED
@@ -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.
|
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.
|
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]
|