|
|
|
@ -46,7 +46,6 @@ func Chartfile(linter *support.Linter) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartName(chartFile))
|
|
|
|
|
linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartNameDirMatch(linter.ChartDir, chartFile))
|
|
|
|
|
|
|
|
|
|
// Chart metadata
|
|
|
|
|
linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartAPIVersion(chartFile))
|
|
|
|
@ -82,13 +81,6 @@ func validateChartName(cf *chart.Metadata) error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func validateChartNameDirMatch(chartDir string, cf *chart.Metadata) error {
|
|
|
|
|
if cf.Name != filepath.Base(chartDir) {
|
|
|
|
|
return errors.Errorf("directory name (%s) and chart name (%s) must be the same", filepath.Base(chartDir), cf.Name)
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func validateChartAPIVersion(cf *chart.Metadata) error {
|
|
|
|
|
if cf.APIVersion == "" {
|
|
|
|
|
return errors.New("apiVersion is required. The value must be either \"v1\" or \"v2\"")
|
|
|
|
|