lib/vidar/cli.rb in vidar-0.10.2 vs lib/vidar/cli.rb in vidar-0.11.0
- old
+ new
@@ -132,11 +132,11 @@
exit(1)
end
end
desc "kube_exec", "Execute given command in the first running pod"
- method_option :command, default: "/bin/sh"
+ method_option :command
method_option :name, required: false
def kube_exec
Log.info "Current kubectl context: #{Config.get!(:kubectl_context)}"
deploy_config = Config.deploy_config
@@ -162,10 +162,17 @@
desc "console", "Execute console command in the first running pod"
method_option :command, required: false
method_option :name, required: false
def console
- invoke :kube_exec, name: options[:name], command: options[:command] || Config.get!(:console_command)
+ invoke :kube_exec, [], name: options[:name], command: options[:command] || Config.get!(:console_command)
+ end
+
+ desc "ssh", "Execute shell command in the first running pod"
+ method_option :command, required: false
+ method_option :name, required: false
+ def ssh
+ invoke :kube_exec, [], name: options[:name], command: options[:command] || Config.get!(:shell_command)
end
method_option :revision, required: false
desc "notify_sentry", "Notify sentry about current release"
def notify_sentry