Class: Rhelm::Subcommand::Pull

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

Overview

Helm install subcommand: ‘helm pull [NAME] [CHART] [flags]`. docs: helm.sh/docs/helm/helm_pull/

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(chart, options = {}) ⇒ Pull

Returns a new instance of Pull.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rhelm/subcommand/pull.rb', line 26

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

  @chart = chart
  @ca_file = options[:ca_file]
  @cert_file = options[:cert_file]
  @destination = options[:destination]
  @devel = !!options[:devel]
  @insecure_skip_tls_verify = !!options[:insecure_skip_tls_verify]
  @key_file = options[:key_file]
  @keyring = options[:keyring]
  @pass_credentials = options[:pass_credentials]
  @password = options[:password]
  @prov = options[:prov]
  @repo = options[:repo]
  @untar = !!options[:untar]
  @untardir = options[:untardir]
  @username = options[:username]
  @verify = !!options[:verify]
  @version = options[:version]
end

Instance Attribute Details

#ca_fileObject (readonly)

Returns the value of attribute ca_file.



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

def ca_file
  @ca_file
end

#cert_fileObject (readonly)

Returns the value of attribute cert_file.



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

def cert_file
  @cert_file
end

#chartObject (readonly)

Returns the value of attribute chart.



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

def chart
  @chart
end

#destinationObject (readonly)

Returns the value of attribute destination.



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

def destination
  @destination
end

#develObject (readonly)

Returns the value of attribute devel.



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

def devel
  @devel
end

#insecure_skip_tls_verifyObject (readonly)

Returns the value of attribute insecure_skip_tls_verify.



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

def insecure_skip_tls_verify
  @insecure_skip_tls_verify
end

#key_fileObject (readonly)

Returns the value of attribute key_file.



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

def key_file
  @key_file
end

#keyringObject (readonly)

Returns the value of attribute keyring.



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

def keyring
  @keyring
end

#pass_credentialsObject (readonly)

Returns the value of attribute pass_credentials.



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

def pass_credentials
  @pass_credentials
end

#passwordObject (readonly)

Returns the value of attribute password.



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

def password
  @password
end

#provObject (readonly)

Returns the value of attribute prov.



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

def prov
  @prov
end

#repoObject (readonly)

Returns the value of attribute repo.



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

def repo
  @repo
end

#untarObject (readonly)

Returns the value of attribute untar.



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

def untar
  @untar
end

#untardirObject (readonly)

Returns the value of attribute untardir.



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

def untardir
  @untardir
end

#usernameObject (readonly)

Returns the value of attribute username.



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

def username
  @username
end

#verifyObject (readonly)

Returns the value of attribute verify.



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

def verify
  @verify
end

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end

Instance Method Details

#cli_argsObject



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/rhelm/subcommand/pull.rb', line 52

def cli_args
  super.tap do |args|
    args << ['--ca-file', ca_file] if ca_file
    args << ['--cert-file', cert_file] if cert_file
    args << ['--destination', destination] if destination
    args << '--devel' if devel
    args << '--insecure-skip-tls-verify' if insecure_skip_tls_verify
    args << ['--key-file', key_file] if key_file
    args << ['--keyring', keyring] if keyring
    args << '--pass-credentials' if pass_credentials
    args << ['--password', password] if password
    args << '--prov' if prov
    args << ['--repo', repo] if repo
    args << '--untar' if untar
    args << ['--untardir', untardir] if untardir
    args << ['--username', username] if username
    args << '--verify' if verify
    args << ['--version', version] if version

    args << chart
  end.flatten
end

#subcommand_nameObject



48
49
50
# File 'lib/rhelm/subcommand/pull.rb', line 48

def subcommand_name
  "pull"
end