Class: Seira::Jobs
Constant Summary collapse
- VALID_ACTIONS =
%w[help list delete run].freeze
- SUMMARY =
"Manage your application's jobs.".freeze
- RESOURCE_SIZES =
{ '1' => { 'CPU_REQUEST' => '200m', 'CPU_LIMIT' => '500m', 'MEMORY_REQUEST' => '500Mi', 'MEMORY_LIMIT' => '1Gi', }, '2' => { 'CPU_REQUEST' => '1', 'CPU_LIMIT' => '2', 'MEMORY_REQUEST' => '2Gi', 'MEMORY_LIMIT' => '4Gi', }, '3' => { 'CPU_REQUEST' => '4', 'CPU_LIMIT' => '6', 'MEMORY_REQUEST' => '10Gi', 'MEMORY_LIMIT' => '15Gi', } }.freeze
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#job_name ⇒ Object
readonly
Returns the value of attribute job_name.
Instance Method Summary collapse
-
#initialize(app:, action:, args:, context:) ⇒ Jobs
constructor
A new instance of Jobs.
- #run ⇒ Object
Methods included from Commands
#gcloud, gcloud, kubectl, #kubectl
Constructor Details
#initialize(app:, action:, args:, context:) ⇒ Jobs
Returns a new instance of Jobs.
32 33 34 35 36 37 38 |
# File 'lib/seira/jobs.rb', line 32 def initialize(app:, action:, args:, context:) @app = app @action = action @context = context @args = args @job_name = args[0] end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
30 31 32 |
# File 'lib/seira/jobs.rb', line 30 def action @action end |
#app ⇒ Object (readonly)
Returns the value of attribute app.
30 31 32 |
# File 'lib/seira/jobs.rb', line 30 def app @app end |
#args ⇒ Object (readonly)
Returns the value of attribute args.
30 31 32 |
# File 'lib/seira/jobs.rb', line 30 def args @args end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
30 31 32 |
# File 'lib/seira/jobs.rb', line 30 def context @context end |
#job_name ⇒ Object (readonly)
Returns the value of attribute job_name.
30 31 32 |
# File 'lib/seira/jobs.rb', line 30 def job_name @job_name end |
Instance Method Details
#run ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/seira/jobs.rb', line 40 def run case action when 'help' run_help when 'list' run_list when 'delete' run_delete when 'run' run_run else fail "Unknown command encountered" end end |