Class: Kubetailrb::Cmd::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/kubetailrb/cmd/help.rb

Overview

Display help.

Constant Summary collapse

FLAGS =
%w[-h --help].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.applicable?(*args) ⇒ Boolean

Returns:



32
33
34
# File 'lib/kubetailrb/cmd/help.rb', line 32

def applicable?(*args)
  missing_args?(*args) || contains_flags?(*args)
end

Instance Method Details

#executeObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/kubetailrb/cmd/help.rb', line 9

def execute
  puts <<~HELP
    Tail your Kubernetes pod logs at the same time.

    Usage:
      kubetailrb pod-query [flags]

    Flags:
      -v, --version       Display version.
      -h, --help          Display help.
          --tail          The number of lines from the end of the logs to show. Defaults to 10.
      -f, --follow        Output appended data as the file grows.
          --file          Display file content.
      -r, --raw           Only display pod logs, without any special formatting.
          --display-names Display pod and container names.
      -n, --namespace     Kubernetes namespace to use.
      -c, --container     Container name when multiple containers in pod. Default to '.'.
      -e, --excludes      Exclude types of log, separated by a comma. Supporting only 'access-logs' and 'dd-logs'.
      -m, --mdcs          Include MDCs if present in the JSON log, separated by a comma. E.g. 'account.id,thread.name'.
  HELP
end