Use helm show chart to identify chart version

Signed-off-by: Felipe Santos <felipecassiors@gmail.com>
This commit is contained in:
Felipe Santos
2022-10-03 22:04:08 -03:00
parent 3165551f9a
commit f15bdbbb0c
17 changed files with 115 additions and 24 deletions
+10
View File
@@ -7,6 +7,7 @@ import (
"sync"
"github.com/Masterminds/semver/v3"
"helm.sh/helm/v3/pkg/chart"
"github.com/helmfile/helmfile/pkg/helmexec"
)
@@ -227,3 +228,12 @@ func (helm *Helm) sync(m *sync.Mutex, f func()) {
f()
}
func (helm *Helm) ShowChart(chartPath string) (chart.Metadata, error) {
switch chartPath {
case "../../foo-bar":
return chart.Metadata{Version: "3.2.0"}, nil
default:
return chart.Metadata{}, errors.New("fake test error")
}
}