Class: Rhelm::Subcommand::Uninstall

Inherits:
Base
  • Object
show all
Defined in:
lib/rhelm/subcommand/uninstall.rb

Overview

Helm uninstall subcommand: ‘helm uninstall RELEASE_NAME […] [flags]`. docs: helm.sh/docs/helm/helm_uninstall/

Instance Attribute Summary collapse

Attributes inherited from Base

#client, #debug, #kube_apiserver, #kube_as_group, #kube_as_user, #kube_context, #kube_token, #kubeconfig, #namespace, #registry_config, #repository_cache, #repository_config

Instance Method Summary collapse

Methods inherited from Base

#args, #full_cli_call, #report_failure, #run

Constructor Details

#initialize(release_name, options = {}) ⇒ Uninstall

Returns a new instance of Uninstall.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/rhelm/subcommand/uninstall.rb', line 16

def initialize(release_name, options = {})
  super(options)

  @release_name = release_name
  @description = options[:description]
  @dry_run = options[:dry_run]
  @help = options[:help]
  @keep_history = options[:keep_history]
  @no_hooks = options[:no_hooks]
  @timeout = options[:timeout]
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



8
9
10
# File 'lib/rhelm/subcommand/uninstall.rb', line 8

def description
  @description
end

#dry_runObject (readonly)

Returns the value of attribute dry_run.



8
9
10
# File 'lib/rhelm/subcommand/uninstall.rb', line 8

def dry_run
  @dry_run
end

#helpObject (readonly)

Returns the value of attribute help.



8
9
10
# File 'lib/rhelm/subcommand/uninstall.rb', line 8

def help
  @help
end

#keep_historyObject (readonly)

Returns the value of attribute keep_history.



8
9
10
# File 'lib/rhelm/subcommand/uninstall.rb', line 8

def keep_history
  @keep_history
end

#no_hooksObject (readonly)

Returns the value of attribute no_hooks.



8
9
10
# File 'lib/rhelm/subcommand/uninstall.rb', line 8

def no_hooks
  @no_hooks
end

#release_nameObject (readonly)

Returns the value of attribute release_name.



8
9
10
# File 'lib/rhelm/subcommand/uninstall.rb', line 8

def release_name
  @release_name
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



8
9
10
# File 'lib/rhelm/subcommand/uninstall.rb', line 8

def timeout
  @timeout
end

Instance Method Details

#cli_argsObject



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/rhelm/subcommand/uninstall.rb', line 32

def cli_args
  super.tap do |args|
    args << ['--description', description] if description
    args << '--dry-run' if dry_run
    args << '--help' if help
    args << '--keep-history' if keep_history
    args << '--no-hooks' if no_hooks
    args << ['--timeout', timeout] if timeout
    args << release_name
  end.flatten
end

#subcommand_nameObject



28
29
30
# File 'lib/rhelm/subcommand/uninstall.rb', line 28

def subcommand_name
  'uninstall'
end