lib/seira/pods.rb in seira-0.1.2 vs lib/seira/pods.rb in seira-0.1.3

- old
+ new

@@ -1,10 +1,11 @@ require 'json' module Seira class Pods - VALID_ACTIONS = %w[list delete logs top run connect].freeze + VALID_ACTIONS = %w[help list delete logs top run connect].freeze + SUMMARY = "Manage your application's pods.".freeze attr_reader :app, :action, :args, :pod_name, :context def initialize(app:, action:, args:, context:) @app = app @@ -14,10 +15,12 @@ @pod_name = args[0] end def run case action + when 'help' + run_help when 'list' run_list when 'delete' run_delete when 'logs' @@ -32,9 +35,15 @@ fail "Unknown command encountered" end end private + + def run_help + puts SUMMARY + puts "\n\n" + puts "TODO" + end def run_list puts `kubectl get pods --namespace=#{app} -o wide` end