fix templater: Guard against empty values map
This commit is contained in:
parent
a1c23d7018
commit
3ef0f35bfe
1 changed files with 5 additions and 0 deletions
|
@ -99,6 +99,11 @@ func templateFile(c *context.Context, rs *context.ResourceSet, filename string)
|
|||
|
||||
var b bytes.Buffer
|
||||
|
||||
// Guard against empty map before merging keys
|
||||
if rs.Values == nil {
|
||||
rs.Values = make(map[string]interface{}, 0)
|
||||
}
|
||||
|
||||
// Merge global and resourceset-specific values (don't override from global)
|
||||
for k, v := range c.Global {
|
||||
if _, ok := rs.Values[k]; !ok {
|
||||
|
|
Loading…
Reference in a new issue