From da768867a36e24862dc8f8935d877e477abd008a Mon Sep 17 00:00:00 2001 From: Adnan Abdulhussein Date: Thu, 13 Oct 2016 19:51:05 -0700 Subject: [PATCH] fix(lint): use correct hash key for rendered tmpl The YAML validation was broken because the renderedContentMap has keys with the path to the template including the chart directory, whereas the linter was trying to access it relative from the chart directory. For example, the hash key was `drupal/templates/deployment.yaml` but the linter was trying to access `templates/deployment.yaml`. This commit fixes the key used to access the rendered content. --- pkg/lint/rules/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go index eb92a6b9f..dabdbc305 100644 --- a/pkg/lint/rules/template.go +++ b/pkg/lint/rules/template.go @@ -94,7 +94,7 @@ func Templates(linter *support.Linter) { // NOTE, disabled for now, Refs https://github.com/kubernetes/helm/issues/1037 // linter.RunLinterRule(support.WarningSev, path, validateQuotes(string(preExecutedTemplate))) - renderedContent := renderedContentMap[fileName] + renderedContent := renderedContentMap[filepath.Join(chart.GetMetadata().Name, fileName)] var yamlStruct K8sYamlStruct // Even though K8sYamlStruct only defines Metadata namespace, an error in any other // key will be raised as well