helm-wrapper 1.1.2 → 1.2.0

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: 4f2a1774f56874f1494f5d441842d3ccf9e3f72a4f781376168a00fbe29703e6
4
- data.tar.gz: 81bdd367e2eb5f6068c686b6f330731394d3c8ee4202d9a82b0ffc5b80cb4526
3
+ metadata.gz: 04761d13453be5c76dde3ad75e0318bd4bdd5c3a67f10d2f934bc75c0f7f768c
4
+ data.tar.gz: c542c8b49e6f6fead7766dfeffec28df80777ec9475066d6ae2683102590f26b
5
5
  SHA512:
6
- metadata.gz: 6076c63eb92e478fb9da5cbbc6ca143a329077aa55f7222d22d75d570dd0dd6398fb5ccd836a0cc88f2533683b16eaed5a504f428e4c6e6837715dd5094e36e4
7
- data.tar.gz: 80676ad1ab70c79003f3834cdf5727c2ba784f9daef95f83b5e797f139e14013a66ae17a7e1183ab17adbe1b290cbff7953421493e89366e9cca7097543dbf4f
6
+ metadata.gz: 991ea23d02ad2276e14ae5aeca40270b175f65d4dbd2e1598b4d69102a6729e59c0247a03c7dce419d21d36da224ada8ca5c73e237255b0ab21582a73ad26de7
7
+ data.tar.gz: 9e88d25edc24fff4999c276b49494727cfe5f095d33517a175457bea3f34b83b6d7fd540d6f7003d4201b0fa5cf6a0942553d5bc7c19d407bcc66c0706f326a5
@@ -72,14 +72,27 @@ module HelmWrapper
72
72
 
73
73
  identifers = yaml.key?("identifiers") ? yaml["identifiers"] : Hash.new
74
74
  @variables = HelmWrapper::Shared::Variables.new(chart: @chart.name, config: @name, namespace: namespace, release: release, identifiers: identifers)
75
- @variables.add_variables(variables: yaml["globals"]) if yaml.key?("globals")
75
+
76
+ if yaml.key?("globals") then
77
+ logger.fatal("Key 'globals' is not a hash in configuration file: #{@path}") unless yaml["globals"].kind_of?(Hash)
78
+ globals = yaml["globals"]
79
+
80
+ @variables.add_variables(variables: globals["variables"]) if globals.key?("variables")
81
+ end
76
82
 
77
83
  if yaml.key?("helm") then
78
84
  logger.fatal("Key 'helm' is not a hash in configuration file: #{@path}") unless yaml["helm"].kind_of?(Hash)
79
85
  helm = yaml["helm"]
80
86
 
81
- @variables.add_variables(variables: helm["variables"]) if helm.key?("variables")
82
- @variables.add_files(base: @base, files: helm["files"]) if helm.key?("files")
87
+ [ "globals", @chart.name ].each do |extra|
88
+ if helm.key?(extra) then
89
+ logger.fatal("Key '#{extra}' under 'helm' is not a hash in configuration file: #{@path}") unless helm[extra].kind_of?(Hash)
90
+ section = helm[extra]
91
+
92
+ @variables.add_variables(variables: section["variables"]) if section.key?("variables")
93
+ @variables.add_files(base: @base, files: section["files"]) if section.key?("files")
94
+ end
95
+ end
83
96
  end
84
97
 
85
98
  @namespace = @variables.core[:namespace]
@@ -4,7 +4,7 @@ module HelmWrapper
4
4
 
5
5
  ###############################################################################
6
6
 
7
- VERSION = "1.1.2"
7
+ VERSION = "1.2.0"
8
8
 
9
9
  ###############################################################################
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helm-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Lees
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake