rhelm 0.1.3 → 0.2.0.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 642a39dd9d935408f626e364f87943a935eac0be43fdea51c5557f487eca1731
4
- data.tar.gz: d23bcdc233857d7eda50439d5d4a0b7eb4de15d71fa9d33add9dad783ce38eb4
3
+ metadata.gz: 53cedc0b285936bb0c454d379b0068e8a597d13a79fc4a25e75f94a29cc65550
4
+ data.tar.gz: 23fe3ad48670394a8deb74e80531d696f45480f9a179ca8d4dba17b3cd6d1642
5
5
  SHA512:
6
- metadata.gz: ac9b7d4592c5391a091d802fee3a21f995e25f88e7b4f0f4aecc4ebf6e5680efe8ddf992f65cc417bfdbb9600c9baeb654842b49e6d2becca276219477d4498d
7
- data.tar.gz: 29ab99987e9f4fac05b50179ac0521e57bcae5b685b059d92ef54eedf9897431ce4ffba6d3d3e8b770d42c4195539915745531ee61fc1a40c977c06ac291676f
6
+ metadata.gz: 32af281c7d4ccea1c685251482ec4054fc15901376513b6bcb728210be83c941a39d8d13acbd9eaeec979dc14f97c2052ee0619cb367f3e355892425962e50f8
7
+ data.tar.gz: a6208ffc0bb2460ef1c939d43c42646b7537640a8d6e3277fd44b6d728af6c139b8770805df3d57f2933c5b6569d0629335cd444a50c1aaef7d87beeed23a60b
data/lib/rhelm/client.rb CHANGED
@@ -8,6 +8,7 @@ module Rhelm
8
8
  SUBCOMMANDS = %i(
9
9
  dependency env history install pull rollback
10
10
  status test uninstall upgrade verify version
11
+ list lint
11
12
  )
12
13
  SUBCOMMANDS.each { |s| require_relative "subcommand/#{s}" }
13
14
 
@@ -22,6 +22,7 @@ module Rhelm
22
22
  :name_template,
23
23
  :no_hooks,
24
24
  :output,
25
+ :pass_credentials,
25
26
  :password,
26
27
  :post_renderer,
27
28
  :release,
@@ -37,7 +38,8 @@ module Rhelm
37
38
  :values,
38
39
  :verify,
39
40
  :version,
40
- :wait
41
+ :wait,
42
+ :wait_for_jobs
41
43
 
42
44
  def initialize(release, chart, options = {})
43
45
  super(options)
@@ -60,6 +62,7 @@ module Rhelm
60
62
  @name_template = options[:name_template]
61
63
  @no_hooks = options[:no_hooks]
62
64
  @output = options[:output]
65
+ @pass_credentials = options[:pass_credentials]
63
66
  @password = options[:password]
64
67
  @post_renderer = options[:post_renderer]
65
68
  @render_subchart_notes = options[:render_subchart_notes]
@@ -75,6 +78,7 @@ module Rhelm
75
78
  @verify = options[:verify]
76
79
  @version = options[:version]
77
80
  @wait = options[:wait]
81
+ @wait_for_jobs = options[:wait_for_jobs]
78
82
  end
79
83
 
80
84
  def subcommand_name
@@ -99,6 +103,7 @@ module Rhelm
99
103
  args << ['--name-template', name_template] if name_template
100
104
  args << '--no-hooks' if no_hooks
101
105
  args << ['--output', output] if output
106
+ args << '--pass-credentials' if pass_credentials
102
107
  args << ['--password', password] if password
103
108
  args << ['--post-renderer', post_renderer] if post_renderer
104
109
  args << '--render-subchart-notes' if render_subchart_notes
@@ -146,8 +151,9 @@ module Rhelm
146
151
  end
147
152
 
148
153
  args << '--verify' if verify
149
- args << ['version', version] if version
154
+ args << ['--version', version] if version
150
155
  args << '--wait' if wait
156
+ args << '--wait-for-jobs' if wait_for_jobs
151
157
 
152
158
  args << release
153
159
  args << chart
@@ -0,0 +1,78 @@
1
+ require_relative 'base'
2
+
3
+ module Rhelm
4
+ module Subcommand
5
+ ## Helm lint subcommand: `helm lint PATH [flags]`.
6
+ ## docs: https://helm.sh/docs/helm/helm_lint/
7
+ class Lint < Base
8
+ attr_reader :path,
9
+ :set,
10
+ :set_file,
11
+ :set_string,
12
+ :strict,
13
+ :values,
14
+ :with_subcharts
15
+
16
+ def initialize(path, options = {})
17
+ super(options)
18
+
19
+ @path = path
20
+ @set = options[:set]
21
+ @set_file = options[:set_file]
22
+ @set_string = options[:set_string]
23
+ @strict = options[:strict]
24
+ @values = options[:values]
25
+ @with_subcharts = options[:with_subcharts]
26
+ end
27
+
28
+ def subcommand_name
29
+ 'lint'
30
+ end
31
+
32
+ def cli_args
33
+ super.tap do |args|
34
+ if set && !set.empty?
35
+ case set
36
+ when Hash
37
+ args << set.map { |key, value| ['--set', "#{key}=#{value}" ] }.flatten
38
+ else
39
+ args << ['--set', set]
40
+ end
41
+ end
42
+
43
+ if set_file && !set_file.empty?
44
+ case set_file
45
+ when Hash
46
+ args << set_file.map { |key, value| ['--set-file', "#{key}=#{value}" ] }.flatten
47
+ else
48
+ args << ['--set-file', set_file]
49
+ end
50
+ end
51
+
52
+ if set_string && !set_string.empty?
53
+ case set_string
54
+ when Hash
55
+ args << set_string.map { |key, value| ['--set-string', "#{key}=#{value}" ] }.flatten
56
+ else
57
+ args << ['--set-string', set_string]
58
+ end
59
+ end
60
+
61
+ if values && !values.empty?
62
+ case values
63
+ when Array
64
+ args << values.map { |values_file| ['--values', values_file ] }.flatten
65
+ else
66
+ args << ['--values', values]
67
+ end
68
+ end
69
+
70
+ args << '--with-subcharts' if with_subcharts
71
+ args << '--strict' if strict
72
+
73
+ args << path
74
+ end.flatten
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,78 @@
1
+ require_relative 'base'
2
+
3
+ module Rhelm
4
+ module Subcommand
5
+ ## Helm list subcommand: `helm list [flags]`.
6
+ ## docs: https://helm.sh/docs/helm/helm_list/
7
+ class List < Base
8
+ attr_reader :all,
9
+ :all_namespaces,
10
+ :date,
11
+ :deployed,
12
+ :failed,
13
+ :filter,
14
+ :help,
15
+ :max,
16
+ :offset,
17
+ :output,
18
+ :pending,
19
+ :reverse,
20
+ :selector,
21
+ :short,
22
+ :superseded,
23
+ :time_format,
24
+ :uninstalled,
25
+ :uninstalling
26
+
27
+ def initialize(options = {})
28
+ super(options)
29
+
30
+ @all = options[:all]
31
+ @all_namespaces = options[:all_namespaces]
32
+ @date = options[:date]
33
+ @deployed = options[:deployed]
34
+ @failed = options[:failed]
35
+ @filter = options[:filter]
36
+ @help = options[:help]
37
+ @max = options[:max]
38
+ @offset = options[:offset]
39
+ @output = options[:output]
40
+ @pending = options[:pending]
41
+ @reverse = options[:reverse]
42
+ @selector = options[:selector]
43
+ @short = options[:short]
44
+ @superseded = options[:superseded]
45
+ @time_format = options[:time_format]
46
+ @uninstalled = options[:uninstalled]
47
+ @uninstalling = options[:uninstalling]
48
+ end
49
+
50
+ def subcommand_name
51
+ 'ls'
52
+ end
53
+
54
+ def cli_args
55
+ super.tap do |args|
56
+ args << '--all' if all
57
+ args << '--all-namespaces' if all_namespaces
58
+ args << '--date' if date
59
+ args << '--deployed' if deployed
60
+ args << '--failed' if failed
61
+ args << ['--filter', filter] if filter
62
+ args << '--help' if help
63
+ args << ['--max', max] if max
64
+ args << ['--offset', offset] if offset
65
+ args << ['--output', output] if output
66
+ args << '--pending' if pending
67
+ args << '--reverse' if reverse
68
+ args << ['--selector', selector] if selector
69
+ args << '--short' if short
70
+ args << '--superseded' if superseded
71
+ args << ['--time-format', time_format] if time_format
72
+ args << '--uninstalled' if uninstalled
73
+ args << '--uninstalling' if uninstalling
74
+ end.flatten
75
+ end
76
+ end
77
+ end
78
+ end
@@ -13,6 +13,7 @@ module Rhelm
13
13
  :insecure_skip_tls_verify,
14
14
  :key_file,
15
15
  :keyring,
16
+ :pass_credentials,
16
17
  :password,
17
18
  :prov,
18
19
  :repo,
@@ -33,7 +34,9 @@ module Rhelm
33
34
  @insecure_skip_tls_verify = !!options[:insecure_skip_tls_verify]
34
35
  @key_file = options[:key_file]
35
36
  @keyring = options[:keyring]
37
+ @pass_credentials = options[:pass_credentials]
36
38
  @password = options[:password]
39
+ @prov = options[:prov]
37
40
  @repo = options[:repo]
38
41
  @untar = !!options[:untar]
39
42
  @untardir = options[:untardir]
@@ -55,7 +58,9 @@ module Rhelm
55
58
  args << '--insecure-skip-tls-verify' if insecure_skip_tls_verify
56
59
  args << ['--key-file', key_file] if key_file
57
60
  args << ['--keyring', keyring] if keyring
61
+ args << '--pass-credentials' if pass_credentials
58
62
  args << ['--password', password] if password
63
+ args << '--prov' if prov
59
64
  args << ['--repo', repo] if repo
60
65
  args << '--untar' if untar
61
66
  args << ['--untardir', untardir] if untardir
@@ -1,26 +1,44 @@
1
- require_relative "base"
1
+ require_relative 'base'
2
2
 
3
3
  module Rhelm
4
4
  module Subcommand
5
5
  ## Helm uninstall subcommand: `helm uninstall RELEASE_NAME [...] [flags]`.
6
6
  ## docs: https://helm.sh/docs/helm/helm_uninstall/
7
7
  class Uninstall < Base
8
- attr_reader :release_name
8
+ attr_reader :release_name,
9
+ :description,
10
+ :dry_run,
11
+ :help,
12
+ :keep_history,
13
+ :no_hooks,
14
+ :timeout
9
15
 
10
16
  def initialize(release_name, options = {})
11
17
  super(options)
12
18
 
13
19
  @release_name = release_name
20
+ @description = options[:description]
21
+ @dry_run = options[:dry_run]
22
+ @help = options[:help]
23
+ @keep_history = options[:keep_history]
24
+ @no_hooks = options[:no_hooks]
25
+ @timeout = options[:timeout]
14
26
  end
15
27
 
16
28
  def subcommand_name
17
- "uninstall"
29
+ 'uninstall'
18
30
  end
19
31
 
20
32
  def cli_args
21
33
  super.tap do |args|
34
+ args << ['--description', description] if description
35
+ args << '--dry-run' if dry_run
36
+ args << '--help' if help
37
+ args << '--keep-history' if keep_history
38
+ args << '--no-hooks' if no_hooks
39
+ args << ['--timeout', timeout] if timeout
22
40
  args << release_name
23
- end
41
+ end.flatten
24
42
  end
25
43
  end
26
44
  end
@@ -12,7 +12,6 @@ module Rhelm
12
12
  :cert_file,
13
13
  :cleanup_on_fail,
14
14
  :create_namespace,
15
- :dependency_update,
16
15
  :description,
17
16
  :devel,
18
17
  :disable_openapi_validation,
@@ -26,6 +25,7 @@ module Rhelm
26
25
  :keyring,
27
26
  :no_hooks,
28
27
  :output,
28
+ :pass_credentials,
29
29
  :password,
30
30
  :post_renderer,
31
31
  :render_subchart_notes,
@@ -41,8 +41,8 @@ module Rhelm
41
41
  :values,
42
42
  :verify,
43
43
  :version,
44
- :wait
45
-
44
+ :wait,
45
+ :wait_for_jobs
46
46
 
47
47
  def initialize(release, chart, options = {})
48
48
  super(options)
@@ -53,7 +53,7 @@ module Rhelm
53
53
  @ca_file = options[:ca_file]
54
54
  @cert_file = options[:cert_file]
55
55
  @cleanup_on_fail = !!options[:cleanup_on_fail]
56
- @dependency_update = !!options[:dependency_update]
56
+ @create_namespace = !!options[:create_namespace]
57
57
  @description = options[:description]
58
58
  @devel = !!options[:devel]
59
59
  @disable_openapi_validation = !!options[:disable_openapi_validation]
@@ -67,6 +67,7 @@ module Rhelm
67
67
  @keyring = options[:keyring]
68
68
  @no_hooks = !!options[:no_hooks]
69
69
  @output = options[:output]
70
+ @pass_credentials = options[:pass_credentials]
70
71
  @password = options[:password]
71
72
  @post_renderer = options[:post_renderer]
72
73
  @render_subchart_notes = !!options[:render_subchart_notes]
@@ -83,6 +84,7 @@ module Rhelm
83
84
  @verify = !!options[:verify]
84
85
  @version = options[:version]
85
86
  @wait = !!options[:wait]
87
+ @wait_for_jobs = !!options[:wait_for_jobs]
86
88
  end
87
89
 
88
90
  def subcommand_name
@@ -95,7 +97,7 @@ module Rhelm
95
97
  args << ['--ca-file', ca_file] if ca_file
96
98
  args << ['--cert-file', cert_file] if cert_file
97
99
  args << '--cleanup-on-fail' if cleanup_on_fail
98
- args << '--dependency-update' if dependency_update
100
+ args << '--create-namespace' if create_namespace
99
101
  args << ['--description', description] if description
100
102
  args << '--devel' if devel
101
103
  args << '--disable-openapi-validation' if disable_openapi_validation
@@ -109,6 +111,7 @@ module Rhelm
109
111
  args << ['--keyring', keyring] if keyring
110
112
  args << '--no-hooks' if no_hooks
111
113
  args << ['--output', output] if output
114
+ args << '--pass-credentials' if pass_credentials
112
115
  args << ['--password', password] if password
113
116
  args << ['--post-renderer', post_renderer] if post_renderer
114
117
  args << '--render-subchart-notes' if render_subchart_notes
@@ -157,8 +160,9 @@ module Rhelm
157
160
  end
158
161
 
159
162
  args << '--verify' if verify
160
- args << ['version', version] if version
163
+ args << ['--version', version] if version
161
164
  args << '--wait' if wait
165
+ args << '--wait-for-jobs' if wait_for_jobs
162
166
 
163
167
  args << release
164
168
  args << chart
data/lib/rhelm/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Rhelm
3
- VERSION = "0.1.3"
3
+ VERSION = "0.2.0.pre"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhelm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Newton
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-06-29 00:00:00.000000000 Z
12
+ date: 2021-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pry
@@ -104,6 +104,8 @@ files:
104
104
  - lib/rhelm/subcommand/env.rb
105
105
  - lib/rhelm/subcommand/history.rb
106
106
  - lib/rhelm/subcommand/install.rb
107
+ - lib/rhelm/subcommand/lint.rb
108
+ - lib/rhelm/subcommand/list.rb
107
109
  - lib/rhelm/subcommand/pull.rb
108
110
  - lib/rhelm/subcommand/rollback.rb
109
111
  - lib/rhelm/subcommand/status.rb
@@ -133,9 +135,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
135
  version: '2.7'
134
136
  required_rubygems_version: !ruby/object:Gem::Requirement
135
137
  requirements:
136
- - - ">="
138
+ - - ">"
137
139
  - !ruby/object:Gem::Version
138
- version: '0'
140
+ version: 1.3.1
139
141
  requirements: []
140
142
  rubygems_version: 3.2.13
141
143
  signing_key: