Fix set flag are ignored when used in conjunction with jsonPatches (#867)

* Fix set flag are ignored when used in conjunction with jsonPatches

Signed-off-by: xiaomudk <xiaomudk@gmail.com>
This commit is contained in:
xiaomudk
2023-05-24 07:29:19 +08:00
committed by GitHub
parent 8b3ad5b793
commit c498af3f52
7 changed files with 171 additions and 0 deletions
+6
View File
@@ -1052,6 +1052,7 @@ type ChartPrepareOptions struct {
IncludeTransitiveNeeds bool
Concurrency int
KubeVersion string
Set []string
}
type chartPrepareResult struct {
@@ -1225,6 +1226,11 @@ func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurre
chartifyOpts.KubeVersion = release.KubeVersion
chartifyOpts.ApiVersions = release.ApiVersions
var flags []string
for _, s := range opts.Set {
flags = append(flags, "--set", s)
}
chartifyOpts.SetFlags = flags
out, err := c.Chartify(release.Name, chartPath, chartify.WithChartifyOpts(chartifyOpts))
if err != nil {