Revert "Fix using same helm chart with different versions (#4999)"

This reverts commit 0f244a4a07.
This commit is contained in:
Natasha Sarkar
2023-05-09 13:16:22 -05:00
committed by GitHub
parent c2bd42e774
commit 3d6f40bd5e
3 changed files with 6 additions and 167 deletions

View File

@@ -91,12 +91,7 @@ func (p *HelmChartInflationGeneratorPlugin) validateArgs() (err error) {
// be under the loader root (unless root restrictions are
// disabled).
if p.ValuesFile == "" {
// If the version is specified, use the versioned values file.
if p.Version != "" {
p.ValuesFile = filepath.Join(p.ChartHome, fmt.Sprintf("%s-%s", p.Name, p.Version), p.Name, "values.yaml")
} else {
p.ValuesFile = filepath.Join(p.ChartHome, p.Name, "values.yaml")
}
p.ValuesFile = filepath.Join(p.ChartHome, p.Name, "values.yaml")
}
for i, file := range p.AdditionalValuesFiles {
// use Load() to enforce root restrictions
@@ -137,17 +132,10 @@ func (p *HelmChartInflationGeneratorPlugin) errIfIllegalValuesMerge() error {
}
func (p *HelmChartInflationGeneratorPlugin) absChartHome() string {
var chartHome string
if filepath.IsAbs(p.ChartHome) {
chartHome = p.ChartHome
} else {
chartHome = filepath.Join(p.h.Loader().Root(), p.ChartHome)
return p.ChartHome
}
if p.Version != "" {
return filepath.Join(chartHome, fmt.Sprintf("%s-%s", p.Name, p.Version))
}
return chartHome
return filepath.Join(p.h.Loader().Root(), p.ChartHome)
}
func (p *HelmChartInflationGeneratorPlugin) runHelmCommand(