Merge pull request #13601 from gjenkins8/cleanup_values_lint

cleanup: Remove superseded 'lint/rules.Values' function
main
George Jenkins 3 days ago committed by GitHub
commit bd897c96fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -26,20 +26,13 @@ import (
"helm.sh/helm/v4/pkg/lint/support" "helm.sh/helm/v4/pkg/lint/support"
) )
// Values lints a chart's values.yaml file.
//
// This function is deprecated and will be removed in Helm 4.
func Values(linter *support.Linter) {
ValuesWithOverrides(linter, map[string]interface{}{})
}
// ValuesWithOverrides tests the values.yaml file. // ValuesWithOverrides tests the values.yaml file.
// //
// If a schema is present in the chart, values are tested against that. Otherwise, // If a schema is present in the chart, values are tested against that. Otherwise,
// they are only tested for well-formedness. // they are only tested for well-formedness.
// //
// If additional values are supplied, they are coalesced into the values in values.yaml. // If additional values are supplied, they are coalesced into the values in values.yaml.
func ValuesWithOverrides(linter *support.Linter, values map[string]interface{}) { func ValuesWithOverrides(linter *support.Linter, valueOverrides map[string]interface{}) {
file := "values.yaml" file := "values.yaml"
vf := filepath.Join(linter.ChartDir, file) vf := filepath.Join(linter.ChartDir, file)
fileExists := linter.RunLinterRule(support.InfoSev, file, validateValuesFileExistence(vf)) fileExists := linter.RunLinterRule(support.InfoSev, file, validateValuesFileExistence(vf))
@ -48,7 +41,7 @@ func ValuesWithOverrides(linter *support.Linter, values map[string]interface{})
return return
} }
linter.RunLinterRule(support.ErrorSev, file, validateValuesFile(vf, values)) linter.RunLinterRule(support.ErrorSev, file, validateValuesFile(vf, valueOverrides))
} }
func validateValuesFileExistence(valuesPath string) error { func validateValuesFileExistence(valuesPath string) error {

Loading…
Cancel
Save