Class: Eien::Apps::DeleteTask
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Task
#context, #namespace, #task_config
Instance Method Summary collapse
-
#initialize(context, name) ⇒ DeleteTask
constructor
A new instance of DeleteTask.
- #run! ⇒ Object
Methods included from Helpers::TimeHelpers
Constructor Details
#initialize(context, name) ⇒ DeleteTask
Returns a new instance of DeleteTask.
8 9 10 11 |
# File 'lib/eien/apps/delete_task.rb', line 8 def initialize(context, name) @name = name super(context, nil) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/eien/apps/delete_task.rb', line 6 def name @name end |
Instance Method Details
#run! ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/eien/apps/delete_task.rb', line 13 def run! v1_client = kubeclient_builder.build_v1_kubeclient(context) eien_client = kubeclient_builder.build_eien_kubeclient(context) namespace = eien_client.get_app(name).spec.namespace v1_client.delete_namespace(namespace) eien_client.delete_app(name) end |