Class: Kubert::Cli

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

Instance Method Summary collapse

Instance Method Details

#consoleObject



31
32
33
# File 'lib/kubert/cli.rb', line 31

def console
  execute(*Kubert.console_command)
end

#contextObject



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

def context
  puts Kubert.context
end

#deployObject



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

def deploy
  Deployment.perform(options)
end

#env(*args) ⇒ Object



61
62
63
# File 'lib/kubert/cli.rb', line 61

def env(*args)
  Kubert::EnvCli.start(args)
end

#execute(*command) ⇒ Object



37
38
39
# File 'lib/kubert/cli.rb', line 37

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

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



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

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

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



42
43
44
# File 'lib/kubert/cli.rb', line 42

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

#rollbackObject



73
74
75
# File 'lib/kubert/cli.rb', line 73

def rollback
  Deployment.rollback(options)
end

#sandboxObject



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

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