Class: Kubert::Cli

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

Instance Method Summary collapse

Instance Method Details

#consoleObject



24
25
26
# File 'lib/kubert/cli.rb', line 24

def console
  execute(*Kubert.console_command)
end

#contextObject



12
13
14
# File 'lib/kubert/cli.rb', line 12

def context
  puts Kubert.context
end

#deployObject



45
46
47
# File 'lib/kubert/cli.rb', line 45

def deploy
  Deployment.perform(options)
end

#execute(*command) ⇒ Object



29
30
31
# File 'lib/kubert/cli.rb', line 29

def execute(*command)
  Pods.execute(command)
end

#list(pod_type, status = :running) ⇒ Object



7
8
9
# File 'lib/kubert/cli.rb', line 7

def list(pod_type, status=:running)
  puts Pods.list(pod_type, status)
end

#logs(pod_type, status = :running) ⇒ Object



34
35
36
# File 'lib/kubert/cli.rb', line 34

def logs(pod_type, status= :running)
  Pods.logs(pod_type, status)
end

#rollbackObject



56
57
58
# File 'lib/kubert/cli.rb', line 56

def rollback
  Deployment.rollback(options)
end

#sandboxObject



18
19
20
# File 'lib/kubert/cli.rb', line 18

def sandbox
  execute(*Kubert.console_command, "--sandbox")
end