lib/seira/pods.rb in seira-0.7.5 vs lib/seira/pods.rb in seira-0.8.0

- old
+ new

@@ -39,11 +39,16 @@ private def run_help puts SUMMARY puts "\n\n" - puts "TODO" + puts "Possible actions:\n\n" + puts "list: List all the pods (output mode wide)." + puts "delete: Delete the pod (positional arg)." + puts "logs: Log the output of the pod (provided via positional arg)." + puts "top: Print the current resource usage for the specified pod (optional positional arg) or all the pods (default) in the context's namespace." + puts "connect: Connect to, or run a command on (--command=), a running pod (positional arg or --pod=), or create a new dedicated pod (--dedicated). Can override tier (--tier=)" end def run_list kubectl("get pods -o wide", context: context) end @@ -51,19 +56,19 @@ def run_delete kubectl("delete pod #{pod_name}", context: context) end def run_logs - kubectl("logs #{pod_name} -c #{app}") + kubectl("logs #{pod_name} -c #{app}", context: context) end def run_top kubectl("top pod #{pod_name} --containers", context: context) end def run_connect tier = nil - pod_name = nil + pod_name = pod_name dedicated = false command = 'sh' args.each do |arg| if arg.start_with? '--tier='