Class: Kuberun::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/kuberun/cli.rb

Overview

Handle the application command line parsing and the dispatch to various command objects

Constant Summary collapse

DEFAULT_OPTIONS_FOR_KUBECTL_OPTIONS =
{ type: :string, default: '', desc: 'See kubectl options' }.freeze
Error =

Error raised by this runner

Class.new(StandardError)

Instance Method Summary collapse

Instance Method Details

#run_pod(deployment_name) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/kuberun/cli.rb', line 30

def run_pod(deployment_name)
  if options[:help]
    invoke :help, ['run_pod']
  else
    require_relative 'commands/run_pod'
    Kuberun::Commands::RunPod.new(deployment_name, options).execute
  end
end

#versionObject



21
22
23
24
# File 'lib/kuberun/cli.rb', line 21

def version
  require_relative 'version'
  puts "v#{Kuberun::VERSION}"
end