Class: Rhelm::Subcommand::Upgrade
- Defined in:
- lib/rhelm/subcommand/upgrade.rb
Overview
Helm upgrade subcommand: ‘helm upgrade [RELEASE] [CHART] [flags]`. docs: helm.sh/docs/helm/helm_upgrade/
Instance Attribute Summary collapse
-
#atomic ⇒ Object
readonly
Returns the value of attribute atomic.
-
#ca_file ⇒ Object
readonly
Returns the value of attribute ca_file.
-
#cert_file ⇒ Object
readonly
Returns the value of attribute cert_file.
-
#chart ⇒ Object
readonly
Returns the value of attribute chart.
-
#cleanup_on_fail ⇒ Object
readonly
Returns the value of attribute cleanup_on_fail.
-
#create_namespace ⇒ Object
readonly
Returns the value of attribute create_namespace.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#devel ⇒ Object
readonly
Returns the value of attribute devel.
-
#disable_openapi_validation ⇒ Object
readonly
Returns the value of attribute disable_openapi_validation.
-
#dry_run ⇒ Object
readonly
Returns the value of attribute dry_run.
-
#force ⇒ Object
readonly
Returns the value of attribute force.
-
#help ⇒ Object
readonly
Returns the value of attribute help.
-
#history_max ⇒ Object
readonly
Returns the value of attribute history_max.
-
#insecure_skip_tls_verify ⇒ Object
readonly
Returns the value of attribute insecure_skip_tls_verify.
-
#install ⇒ Object
readonly
Returns the value of attribute install.
-
#key_file ⇒ Object
readonly
Returns the value of attribute key_file.
-
#keyring ⇒ Object
readonly
Returns the value of attribute keyring.
-
#no_hooks ⇒ Object
readonly
Returns the value of attribute no_hooks.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#pass_credentials ⇒ Object
readonly
Returns the value of attribute pass_credentials.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#post_renderer ⇒ Object
readonly
Returns the value of attribute post_renderer.
-
#release ⇒ Object
readonly
Returns the value of attribute release.
-
#render_subchart_notes ⇒ Object
readonly
Returns the value of attribute render_subchart_notes.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#reset_values ⇒ Object
readonly
Returns the value of attribute reset_values.
-
#reuse_values ⇒ Object
readonly
Returns the value of attribute reuse_values.
-
#set ⇒ Object
readonly
Returns the value of attribute set.
-
#set_file ⇒ Object
readonly
Returns the value of attribute set_file.
-
#set_string ⇒ Object
readonly
Returns the value of attribute set_string.
-
#skip_crds ⇒ Object
readonly
Returns the value of attribute skip_crds.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
-
#verify ⇒ Object
readonly
Returns the value of attribute verify.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#wait ⇒ Object
readonly
Returns the value of attribute wait.
-
#wait_for_jobs ⇒ Object
readonly
Returns the value of attribute wait_for_jobs.
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
-
#initialize(release, chart, options = {}) ⇒ Upgrade
constructor
A new instance of Upgrade.
- #subcommand_name ⇒ Object
Methods inherited from Base
#args, #full_cli_call, #report_failure, #run
Constructor Details
#initialize(release, chart, options = {}) ⇒ Upgrade
Returns a new instance of Upgrade.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 47 def initialize(release, chart, = {}) super() @release = release @chart = chart @atomic = !![:atomic] @ca_file = [:ca_file] @cert_file = [:cert_file] @cleanup_on_fail = !![:cleanup_on_fail] @create_namespace = !![:create_namespace] @description = [:description] @devel = !![:devel] @disable_openapi_validation = !![:disable_openapi_validation] @dry_run = !![:dry_run] @force = !![:force] @help = !![:help] @history_max = [:history_max] @insecure_skip_tls_verify = !![:insecure_skip_tls_verify] @install = !![:install] @key_file = [:key_file] @keyring = [:keyring] @no_hooks = !![:no_hooks] @output = [:output] @pass_credentials = [:pass_credentials] @password = [:password] @post_renderer = [:post_renderer] @render_subchart_notes = !![:render_subchart_notes] @repo = [:repo] @reset_values = !![:reset_values] @reuse_values = !![:reuse_values] @set = [:set] @set_file = [:set_file] @set_string = [:set_string] @skip_crds = !![:skip_crds] @timeout = [:timeout] @username = [:username] @values = [:values] @verify = !![:verify] @version = [:version] @wait = !![:wait] @wait_for_jobs = !![:wait_for_jobs] end |
Instance Attribute Details
#atomic ⇒ Object (readonly)
Returns the value of attribute atomic.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def atomic @atomic end |
#ca_file ⇒ Object (readonly)
Returns the value of attribute ca_file.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def ca_file @ca_file end |
#cert_file ⇒ Object (readonly)
Returns the value of attribute cert_file.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def cert_file @cert_file end |
#chart ⇒ Object (readonly)
Returns the value of attribute chart.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def chart @chart end |
#cleanup_on_fail ⇒ Object (readonly)
Returns the value of attribute cleanup_on_fail.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def cleanup_on_fail @cleanup_on_fail end |
#create_namespace ⇒ Object (readonly)
Returns the value of attribute create_namespace.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def create_namespace @create_namespace end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def description @description end |
#devel ⇒ Object (readonly)
Returns the value of attribute devel.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def devel @devel end |
#disable_openapi_validation ⇒ Object (readonly)
Returns the value of attribute disable_openapi_validation.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def disable_openapi_validation @disable_openapi_validation end |
#dry_run ⇒ Object (readonly)
Returns the value of attribute dry_run.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def dry_run @dry_run end |
#force ⇒ Object (readonly)
Returns the value of attribute force.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def force @force end |
#help ⇒ Object (readonly)
Returns the value of attribute help.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def help @help end |
#history_max ⇒ Object (readonly)
Returns the value of attribute history_max.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def history_max @history_max end |
#insecure_skip_tls_verify ⇒ Object (readonly)
Returns the value of attribute insecure_skip_tls_verify.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def insecure_skip_tls_verify @insecure_skip_tls_verify end |
#install ⇒ Object (readonly)
Returns the value of attribute install.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def install @install end |
#key_file ⇒ Object (readonly)
Returns the value of attribute key_file.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def key_file @key_file end |
#keyring ⇒ Object (readonly)
Returns the value of attribute keyring.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def keyring @keyring end |
#no_hooks ⇒ Object (readonly)
Returns the value of attribute no_hooks.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def no_hooks @no_hooks end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def output @output end |
#pass_credentials ⇒ Object (readonly)
Returns the value of attribute pass_credentials.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def pass_credentials @pass_credentials end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def password @password end |
#post_renderer ⇒ Object (readonly)
Returns the value of attribute post_renderer.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def post_renderer @post_renderer end |
#release ⇒ Object (readonly)
Returns the value of attribute release.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def release @release end |
#render_subchart_notes ⇒ Object (readonly)
Returns the value of attribute render_subchart_notes.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def render_subchart_notes @render_subchart_notes end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def repo @repo end |
#reset_values ⇒ Object (readonly)
Returns the value of attribute reset_values.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def reset_values @reset_values end |
#reuse_values ⇒ Object (readonly)
Returns the value of attribute reuse_values.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def reuse_values @reuse_values end |
#set ⇒ Object (readonly)
Returns the value of attribute set.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def set @set end |
#set_file ⇒ Object (readonly)
Returns the value of attribute set_file.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def set_file @set_file end |
#set_string ⇒ Object (readonly)
Returns the value of attribute set_string.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def set_string @set_string end |
#skip_crds ⇒ Object (readonly)
Returns the value of attribute skip_crds.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def skip_crds @skip_crds end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def timeout @timeout end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def username @username end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def values @values end |
#verify ⇒ Object (readonly)
Returns the value of attribute verify.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def verify @verify end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def version @version end |
#wait ⇒ Object (readonly)
Returns the value of attribute wait.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def wait @wait end |
#wait_for_jobs ⇒ Object (readonly)
Returns the value of attribute wait_for_jobs.
8 9 10 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 8 def wait_for_jobs @wait_for_jobs end |
Instance Method Details
#cli_args ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 94 def cli_args super.tap do |args| args << '--atomic' if atomic args << ['--ca-file', ca_file] if ca_file args << ['--cert-file', cert_file] if cert_file args << '--cleanup-on-fail' if cleanup_on_fail args << '--create-namespace' if create_namespace args << ['--description', description] if description args << '--devel' if devel args << '--disable-openapi-validation' if disable_openapi_validation args << '--dry-run' if dry_run args << '--force' if force args << '--help' if help args << ['--history-max', history_max] if history_max args << '--insecure-skip-tls-verify' if insecure_skip_tls_verify args << '--install' if install args << ['--key-file', key_file] if key_file args << ['--keyring', keyring] if keyring args << '--no-hooks' if no_hooks args << ['--output', output] if output args << '--pass-credentials' if pass_credentials args << ['--password', password] if password args << ['--post-renderer', post_renderer] if post_renderer args << '--render-subchart-notes' if render_subchart_notes args << ['--repo', repo] if repo args << '--reset-values' if reset_values args << '--reuse-values' if reuse_values if set && !set.empty? case set when Hash args << set.map { |key, value| ['--set', "#{key}=#{value}" ] }.flatten else args << ['--set', set] end end if set_file && !set_file.empty? case set_file when Hash args << set_file.map { |key, value| ['--set-file', "#{key}=#{value}" ] }.flatten else args << ['--set-file', set_file] end end if set_string && !set_string.empty? case set_string when Hash args << set_string.map { |key, value| ['--set-string', "#{key}=#{value}" ] }.flatten else args << ['--set-string', set_string] end end args << '--skip-crds' if skip_crds args << ['--timeout', timeout] if timeout args << ['--username', username] if username if values && !values.empty? case values when Array args << values.map { |values_file| ['--values', values_file ] }.flatten else args << ['--values', values] end end args << '--verify' if verify args << ['--version', version] if version args << '--wait' if wait args << '--wait-for-jobs' if wait_for_jobs args << release args << chart end.flatten end |
#subcommand_name ⇒ Object
90 91 92 |
# File 'lib/rhelm/subcommand/upgrade.rb', line 90 def subcommand_name "upgrade" end |