Class: Rhelm::Subcommand::Status
- Defined in:
- lib/rhelm/subcommand/status.rb
Overview
Helm status subcommand: ‘helm status RELEASE_NAME [flags]`. docs: helm.sh/docs/helm/helm_status/
Instance Attribute Summary collapse
-
#help ⇒ Object
readonly
Returns the value of attribute help.
-
#release_name ⇒ Object
readonly
Returns the value of attribute release_name.
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
- #cli_args ⇒ Object
- #exists? ⇒ Boolean
-
#initialize(release_name, options = {}) ⇒ Status
constructor
A new instance of Status.
- #subcommand_name ⇒ Object
Methods inherited from Base
#args, #full_cli_call, #report_failure, #run
Constructor Details
#initialize(release_name, options = {}) ⇒ Status
Returns a new instance of Status.
11 12 13 14 15 16 |
# File 'lib/rhelm/subcommand/status.rb', line 11 def initialize(release_name, = {}) super() @release_name = release_name @help = [:help] end |
Instance Attribute Details
#help ⇒ Object (readonly)
Returns the value of attribute help.
8 9 10 |
# File 'lib/rhelm/subcommand/status.rb', line 8 def help @help end |
#release_name ⇒ Object (readonly)
Returns the value of attribute release_name.
8 9 10 |
# File 'lib/rhelm/subcommand/status.rb', line 8 def release_name @release_name end |
Instance Method Details
#cli_args ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/rhelm/subcommand/status.rb', line 34 def cli_args super.tap do |args| args << '--help' if help args << release_name end.flatten end |
#exists? ⇒ Boolean
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rhelm/subcommand/status.rb', line 22 def exists? run(raise_on_error: false) do |lines,status| if status == 0 true elsif status == 1 && /Error: release: not found/m.match(lines) false else report_failure(lines, status) end end end |
#subcommand_name ⇒ Object
18 19 20 |
# File 'lib/rhelm/subcommand/status.rb', line 18 def subcommand_name "status" end |