bugfix:(#11391) helm lint infinite loop

when malformed template object

Signed-off-by: wujunwei <wjw3323@live.com>
(cherry picked from commit 316d3fb56a)
release-3.12
wujunwei 2 years ago committed by Matt Farina
parent 524a0e7457
commit 5217482c8e
No known key found for this signature in database
GPG Key ID: 92C44A3D421FF7F9

@ -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