kbe 0.2.1 → 0.2.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/Gemfile.lock +1 -1
- data/lib/kbe/cli/logs_command.rb +25 -0
- data/lib/kbe/cli/root_command.rb +2 -0
- data/lib/kbe/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be5e471aaa83ef9dd04ec665eea8d5ab9751fab64b2e653ce0ccbc5f2939bbb1
|
4
|
+
data.tar.gz: d3ae8dc88f2119f3e520341f04088dec6727e61cf5807290f6d61d396bd7a7df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a9df45ef19e8801c0528179620c19979c406889b245503f277b832003720153906df86bc0267a673d26cba79c5470c544f28cf0b7ef09407413fb067313a8d4
|
7
|
+
data.tar.gz: 653988353149dce476293838db0ee7914f005328c49c42977cfadc1aaebc8630d5c3c3151dd78e464cb756ae3a0d18fb47d5d7ec043fcbf60d57d3183319dda9
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module KBE
|
4
|
+
module CLI
|
5
|
+
class LogsCommand < Clamp::Command
|
6
|
+
option ['-h', '--help'], :flag, "help" do
|
7
|
+
puts "kbe delete selector"
|
8
|
+
exit 0
|
9
|
+
end
|
10
|
+
|
11
|
+
parameter "SELECTOR_OR_POD", "selector or pod name"
|
12
|
+
parameter "[CONTAINER]", "container"
|
13
|
+
|
14
|
+
def execute
|
15
|
+
pod = KBE.pod_by(selector_or_pod, only_running: false)
|
16
|
+
parts = []
|
17
|
+
parts << "logs --tail=10 -f #{pod}"
|
18
|
+
parts << "-c #{container}" if container # let error because it gives the list
|
19
|
+
|
20
|
+
KBE.kubectl parts.join(" ")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
data/lib/kbe/cli/root_command.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative "help_command"
|
|
4
4
|
require_relative "enter_command"
|
5
5
|
require_relative "list_command"
|
6
6
|
require_relative "delete_command"
|
7
|
+
require_relative "logs_command"
|
7
8
|
|
8
9
|
module KBE
|
9
10
|
module CLI
|
@@ -16,6 +17,7 @@ module KBE
|
|
16
17
|
end
|
17
18
|
subcommand ["list"], "List pods", ListCommand
|
18
19
|
subcommand ["enter"], "Enter a container", EnterCommand
|
20
|
+
subcommand ["logs"], "Get logs", LogsCommand
|
19
21
|
subcommand ["delete"], "Delete a pod", DeleteCommand
|
20
22
|
|
21
23
|
subcommand ["version"], "Show version information", VersionCommand
|
data/lib/kbe/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kbe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matti Paksula
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- lib/kbe/cli/enter_command.rb
|
115
115
|
- lib/kbe/cli/help_command.rb
|
116
116
|
- lib/kbe/cli/list_command.rb
|
117
|
+
- lib/kbe/cli/logs_command.rb
|
117
118
|
- lib/kbe/cli/root_command.rb
|
118
119
|
- lib/kbe/cli/version_command.rb
|
119
120
|
- lib/kbe/version.rb
|