kube_wrapper 0.2.1 → 1.0.0
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/Gemfile.lock +1 -1
- data/lib/kube_wrapper/runner.rb +10 -3
- data/lib/kube_wrapper/version.rb +1 -1
- 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: 2d288074ff7accc64da449ee7f9b99876336cac138b2add2b1080b7810ad192c
|
|
4
|
+
data.tar.gz: 227e65eea7fbf81e93d82ab7c16c44e0ef0f72ba24017f02b4f791f6e77f54e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fcfa57990b881154efaeccc67f4f6c39c74d70d0b0b06fda2b711ba30231a147dedff06efa3243ef25e8e1fcb0abe12bfbda33c094c770988a07713574a4fb60
|
|
7
|
+
data.tar.gz: 2044bd3187d6d00f19c0ff5e9ab3a41163acb79d2c807f0aac345b5a77fae778536dd2399e0fded503b160dfd250ffc5028fd6e11adb8524757ee17cbd85d30b
|
data/Gemfile.lock
CHANGED
data/lib/kube_wrapper/runner.rb
CHANGED
|
@@ -16,7 +16,8 @@ module KubeWrapper
|
|
|
16
16
|
set_namespace: {
|
|
17
17
|
cmds: ['set-n', '-n'],
|
|
18
18
|
blurb: <<~DESC
|
|
19
|
-
Changes namespace prefix for further commands to $1.
|
|
19
|
+
Changes namespace prefix for further commands to $1. \
|
|
20
|
+
Pass nothing to print all available namespaces
|
|
20
21
|
DESC
|
|
21
22
|
},
|
|
22
23
|
clear: {
|
|
@@ -26,7 +27,8 @@ module KubeWrapper
|
|
|
26
27
|
set_context: {
|
|
27
28
|
cmds: ['set-c', '-c'],
|
|
28
29
|
blurb: <<~DESC
|
|
29
|
-
Changes kubernetes context.
|
|
30
|
+
Changes kubernetes context. \
|
|
31
|
+
Pass nothing to print all available contexts
|
|
30
32
|
DESC
|
|
31
33
|
}
|
|
32
34
|
}.freeze
|
|
@@ -86,7 +88,12 @@ module KubeWrapper
|
|
|
86
88
|
end
|
|
87
89
|
|
|
88
90
|
def update_namespace!(namespace)
|
|
89
|
-
|
|
91
|
+
if namespace.nil? || namespace.empty?
|
|
92
|
+
puts `kubectl get ns`
|
|
93
|
+
return
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
@namespace = namespace
|
|
90
97
|
@io_out.puts "Namespace set to #{@namespace}"
|
|
91
98
|
end
|
|
92
99
|
|
data/lib/kube_wrapper/version.rb
CHANGED