kerbi 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61f7883ed667291d11e48e35061c4bf4f19e2cafeb8a34c65e7ee32fed992496
4
- data.tar.gz: bed9e75d2d524b807cb2ad1d04179d013075e39e52230dbaa2bc71063ba33c7d
3
+ metadata.gz: dae405be53b5c0a3505a43512bb4551985ae43b4f364a053b9cee99265d99c6d
4
+ data.tar.gz: 6e58d1cbc2945dba01584bf5d687c2be5a5ca01bc6e121f1b938224997114c7a
5
5
  SHA512:
6
- metadata.gz: 249dac3f86bb6ad93f95932a4453d0a307283dbfa79b2a0f6e45f8b76360b35a763921b780a543321632db81d91e11bb220b1c56994288b9c844d8c70ffdfe7d
7
- data.tar.gz: a93cf84a3c7e575fcfcdc12c661a7975585aa9bd3b66df07414bd330662667e9c2abde9f5ca0dd90759b8391d207edcef49b8ac86faf1496da69ecc023ae22f0
6
+ metadata.gz: 33e9e9a0a34833dc0d0822ec2b1764fe3491c7ff616cf8c6d77a428f50010f84a23ea0d72e1f8a5802cf8979fa89eae7e2451625aa1e2fae016c6c7baf700373
7
+ data.tar.gz: 2ffc4c1428bb792432c71c34ba204faf27f1f5bca6f96b7e92165b264db4cb188c64238cd706dafaf3080341a64eef3512d2ef126ab1aedd77f50b49ad00d730
@@ -25,7 +25,9 @@ module Kerbi
25
25
 
26
26
  cmd_meta Kerbi::Consts::CommandSchemas::CONFIG_SHOW
27
27
  def show
28
- echo_data(run_opts.options)
28
+ src = run_opts.options
29
+ hash = Hash[legal_keys.map { |k| [k, src[k]] }]
30
+ echo_data(hash)
29
31
  end
30
32
 
31
33
  cmd_meta Kerbi::Consts::CommandSchemas::CONFIG_RESET
@@ -28,15 +28,15 @@ module Kerbi
28
28
  KUBE_ACCESS_TOKEN = "k8s-access-token"
29
29
  K8S_USERNAME = "k8s-username"
30
30
  K8S_PASSWORD = "k8s-password"
31
- K8S_TOKEN = "k8s-access-token"
32
31
 
33
32
  LEGAL_CONFIG_FILE_KEYS = [
33
+ LOAD_DEFAULT_VALUES,
34
+ OUTPUT_FMT,
34
35
  STATE_BACKEND_TYPE,
35
36
  K8S_AUTH_TYPE,
37
+ KUBE_CONFIG_PATH,
36
38
  KUBE_CONFIG_CONTEXT,
37
- K8S_USERNAME,
38
- K8S_PASSWORD,
39
- KUBE_ACCESS_TOKEN
39
+ KUBE_ACCESS_TOKEN,
40
40
  ]
41
41
  end
42
42
 
@@ -111,8 +111,8 @@ module Kerbi
111
111
  default: true
112
112
  }.freeze
113
113
 
114
- K8S_TOKEN = {
115
- key: OptionKeys::K8S_TOKEN,
114
+ KUBE_ACCESS_TOKEN = {
115
+ key: OptionKeys::KUBE_ACCESS_TOKEN,
116
116
  desc: "Kubernetes auth bearer token for token auth"
117
117
  }.freeze
118
118
 
@@ -199,7 +199,8 @@ module Kerbi
199
199
  WRITE_STATE,
200
200
  K8S_AUTH_TYPE,
201
201
  KUBE_CONFIG_PATH,
202
- KUBE_CONFIG_CONTEXT
202
+ KUBE_CONFIG_CONTEXT,
203
+ KUBE_ACCESS_TOKEN
203
204
  ].freeze
204
205
 
205
206
  VALUES_OPTIONS = [
@@ -128,7 +128,7 @@ module Kerbi
128
128
 
129
129
  # @return [String]
130
130
  def k8s_auth_token
131
- options[consts::K8S_TOKEN]
131
+ options[consts::KUBE_ACCESS_TOKEN]
132
132
  end
133
133
 
134
134
  # @return [String]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kerbi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xavier Millot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2022-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -239,60 +239,60 @@ signing_key:
239
239
  specification_version: 4
240
240
  summary: Multi-strategy Kubernetes manifest templating engine.
241
241
  test_files:
242
- - spec/main/project_code_gen_spec.rb
242
+ - spec/spec_helper.rb
243
243
  - spec/main/mixer_spec.rb
244
+ - spec/main/state_entry_spec.rb
244
245
  - spec/main/configmap_backend_spec.rb
245
246
  - spec/main/state_entry_set_spec.rb
246
- - spec/main/state_entry_spec.rb
247
- - spec/cli/release_handler_spec.rb
248
- - spec/cli/config_handler_spec.rb
249
- - spec/cli/values_handler_spec.rb
250
- - spec/cli/state_handler_spec.rb
251
- - spec/cli/root_handler_spec.rb
252
- - spec/utils/values_utils_spec.rb
253
- - spec/utils/mixing_utils_spec.rb
254
- - spec/utils/misc_utils_spec.rb
247
+ - spec/main/project_code_gen_spec.rb
255
248
  - spec/utils/helm_spec.rb
249
+ - spec/utils/mixing_utils_spec.rb
256
250
  - spec/utils/k8s_auth_spec.rb
251
+ - spec/utils/misc_utils_spec.rb
252
+ - spec/utils/values_utils_spec.rb
257
253
  - spec/mixins/mixer_mixin_spec.rb
258
- - spec/fixtures/mini-projects/hello-kerbi/common/metadata.yaml.erb
259
- - spec/fixtures/mini-projects/hello-kerbi/kerbifile.rb
260
- - spec/fixtures/mini-projects/hello-kerbi/helpers.rb
261
- - spec/fixtures/mini-projects/hello-kerbi/values/v2.yaml
262
- - spec/fixtures/mini-projects/hello-kerbi/values/production.yaml
263
- - spec/fixtures/mini-projects/hello-kerbi/values/values.yaml
264
- - spec/fixtures/mini-projects/hello-kerbi/consts.rb
265
- - spec/fixtures/mini-projects/hello-kerbi/pod-and-service.yaml.erb
266
- - spec/fixtures/expectations/common/bad-tag.txt
267
- - spec/fixtures/expectations/release/init-already-existed.txt
268
- - spec/fixtures/expectations/release/status-data-unreadable.txt
269
- - spec/fixtures/expectations/release/init-both-created.txt
270
- - spec/fixtures/expectations/release/status-all-working.txt
271
- - spec/fixtures/expectations/release/status-not-provisioned.txt
272
- - spec/fixtures/expectations/release/list.txt
273
- - spec/fixtures/expectations/release/delete.txt
254
+ - spec/cli/state_handler_spec.rb
255
+ - spec/cli/values_handler_spec.rb
256
+ - spec/cli/release_handler_spec.rb
257
+ - spec/cli/config_handler_spec.rb
258
+ - spec/cli/root_handler_spec.rb
259
+ - spec/fixtures/embedding.yaml.erb
274
260
  - spec/fixtures/expectations/values/order-of-precedence.yaml
275
- - spec/fixtures/expectations/state/prune-candidates.txt
261
+ - spec/fixtures/expectations/common/bad-tag.txt
276
262
  - spec/fixtures/expectations/state/list.yaml
277
- - spec/fixtures/expectations/state/demote.txt
263
+ - spec/fixtures/expectations/state/delete.txt
278
264
  - spec/fixtures/expectations/state/show.yaml
265
+ - spec/fixtures/expectations/state/prune-candidates.txt
266
+ - spec/fixtures/expectations/state/list.txt
267
+ - spec/fixtures/expectations/state/demote.txt
279
268
  - spec/fixtures/expectations/state/show.txt
280
269
  - spec/fixtures/expectations/state/show.json
281
- - spec/fixtures/expectations/state/set.txt
282
- - spec/fixtures/expectations/state/list.txt
283
270
  - spec/fixtures/expectations/state/promote.txt
284
- - spec/fixtures/expectations/state/delete.txt
285
271
  - spec/fixtures/expectations/state/list.json
286
272
  - spec/fixtures/expectations/state/retag.txt
273
+ - spec/fixtures/expectations/state/set.txt
274
+ - spec/fixtures/expectations/release/delete.txt
275
+ - spec/fixtures/expectations/release/status-not-provisioned.txt
276
+ - spec/fixtures/expectations/release/status-data-unreadable.txt
277
+ - spec/fixtures/expectations/release/list.txt
278
+ - spec/fixtures/expectations/release/init-both-created.txt
279
+ - spec/fixtures/expectations/release/init-already-existed.txt
280
+ - spec/fixtures/expectations/release/status-all-working.txt
287
281
  - spec/fixtures/expectations/config/show-default.yaml
288
282
  - spec/fixtures/expectations/config/bad-set.txt
289
283
  - spec/fixtures/expectations/config/set.txt
284
+ - spec/fixtures/expectations/root/values.json
285
+ - spec/fixtures/expectations/root/template-production.yaml
286
+ - spec/fixtures/expectations/root/template.yaml
287
+ - spec/fixtures/expectations/root/template-read-inlines.yaml
290
288
  - spec/fixtures/expectations/root/template-write.yaml
291
289
  - spec/fixtures/expectations/root/template-read.yaml
292
- - spec/fixtures/expectations/root/template-production.yaml
293
290
  - spec/fixtures/expectations/root/template-inlines.yaml
294
- - spec/fixtures/expectations/root/values.json
295
- - spec/fixtures/expectations/root/template-read-inlines.yaml
296
- - spec/fixtures/expectations/root/template.yaml
297
- - spec/fixtures/embedding.yaml.erb
298
- - spec/spec_helper.rb
291
+ - spec/fixtures/mini-projects/hello-kerbi/values/values.yaml
292
+ - spec/fixtures/mini-projects/hello-kerbi/values/v2.yaml
293
+ - spec/fixtures/mini-projects/hello-kerbi/values/production.yaml
294
+ - spec/fixtures/mini-projects/hello-kerbi/common/metadata.yaml.erb
295
+ - spec/fixtures/mini-projects/hello-kerbi/consts.rb
296
+ - spec/fixtures/mini-projects/hello-kerbi/kerbifile.rb
297
+ - spec/fixtures/mini-projects/hello-kerbi/pod-and-service.yaml.erb
298
+ - spec/fixtures/mini-projects/hello-kerbi/helpers.rb