fix: inject global values in Chartify (#1805)

* fix: inject global values in Chartify

Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>

* test: add integration tests for template --values

Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>

---------

Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>
This commit is contained in:
Thomas Loubiou
2024-12-04 18:51:21 +08:00
committed by GitHub
parent c9173b3e52
commit 8891439cdc
5 changed files with 76 additions and 4 deletions
+1
View File
@@ -250,6 +250,7 @@ func (a *App) Template(c TemplateConfigProvider) error {
Concurrency: c.Concurrency(),
IncludeTransitiveNeeds: c.IncludeNeeds(),
Set: c.Set(),
Values: c.Values(),
KubeVersion: c.KubeVersion(),
}, func() {
ok, errs = a.template(run, c)
+5
View File
@@ -1127,6 +1127,7 @@ type ChartPrepareOptions struct {
Concurrency int
KubeVersion string
Set []string
Values []string
// Delete wait
DeleteWait bool
DeleteTimeout int
@@ -1294,6 +1295,10 @@ func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurre
chartifyOpts.KubeVersion = st.getKubeVersion(release, opts.KubeVersion)
chartifyOpts.ApiVersions = st.getApiVersions(release)
if opts.Values != nil {
chartifyOpts.ValuesFiles = append(opts.Values, chartifyOpts.ValuesFiles...)
}
// https://github.com/helmfile/helmfile/pull/867
// https://github.com/helmfile/helmfile/issues/895
var flags []string