Class: Gitlab::Kubernetes::Helm::V3::DeleteCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Gitlab::Kubernetes::Helm::V3::DeleteCommand
- Defined in:
- lib/gitlab/kubernetes/helm/v3/delete_command.rb
Constant Summary
Constants inherited from BaseCommand
Instance Attribute Summary collapse
-
#postdelete ⇒ Object
readonly
Returns the value of attribute postdelete.
-
#predelete ⇒ Object
readonly
Returns the value of attribute predelete.
Attributes inherited from BaseCommand
Instance Method Summary collapse
- #delete_command ⇒ Object
- #generate_script ⇒ Object
-
#initialize(predelete: nil, postdelete: nil, **args) ⇒ DeleteCommand
constructor
A new instance of DeleteCommand.
- #pod_name ⇒ Object
Methods inherited from BaseCommand
#cluster_role_binding_resource, #config_map_resource, #env, #file_names, #pod_resource, #rbac?, #repository_command, #service_account_resource
Constructor Details
#initialize(predelete: nil, postdelete: nil, **args) ⇒ DeleteCommand
Returns a new instance of DeleteCommand.
10 11 12 13 14 |
# File 'lib/gitlab/kubernetes/helm/v3/delete_command.rb', line 10 def initialize(predelete: nil, postdelete: nil, **args) super(**args) @predelete = predelete @postdelete = postdelete end |
Instance Attribute Details
#postdelete ⇒ Object (readonly)
Returns the value of attribute postdelete.
8 9 10 |
# File 'lib/gitlab/kubernetes/helm/v3/delete_command.rb', line 8 def postdelete @postdelete end |
#predelete ⇒ Object (readonly)
Returns the value of attribute predelete.
8 9 10 |
# File 'lib/gitlab/kubernetes/helm/v3/delete_command.rb', line 8 def predelete @predelete end |
Instance Method Details
#delete_command ⇒ Object
28 29 30 |
# File 'lib/gitlab/kubernetes/helm/v3/delete_command.rb', line 28 def delete_command ['helm', 'uninstall', name, *namespace_flag].shelljoin end |
#generate_script ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/gitlab/kubernetes/helm/v3/delete_command.rb', line 16 def generate_script super + [ predelete, delete_command, postdelete ].compact.join("\n") end |
#pod_name ⇒ Object
24 25 26 |
# File 'lib/gitlab/kubernetes/helm/v3/delete_command.rb', line 24 def pod_name "uninstall-#{name}" end |