bugfix:(#11391) helm lint infinite loop

when malformed template object

Signed-off-by: wujunwei <wjw3323@live.com>
pull/11397/head
wujunwei 3 years ago
parent 952708b436
commit 316d3fb56a

@ -141,10 +141,11 @@ func Templates(linter *support.Linter, values map[string]interface{}, namespace
break break
} }
// If YAML linting fails, we sill progress. So we don't capture the returned state // If YAML linting fails, it will always be fails next block. so we should return here.
// on this linter run. // fix https://github.com/helm/helm/issues/11391
linter.RunLinterRule(support.ErrorSev, fpath, validateYamlContent(err)) if !linter.RunLinterRule(support.ErrorSev, fpath, validateYamlContent(err)) {
return
}
if yamlStruct != nil { if yamlStruct != nil {
// NOTE: set to warnings to allow users to support out-of-date kubernetes // NOTE: set to warnings to allow users to support out-of-date kubernetes
// Refs https://github.com/helm/helm/issues/8596 // Refs https://github.com/helm/helm/issues/8596

Loading…
Cancel
Save