mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-17 21:15:53 +02:00
Add support for --validate on chartify (#1960)
Apparently we needed to pass `--validate` on helm-template run by chartify when the targeted chart contains Capabilities.APIVersions in a chart template. Otherwise, you can never make such chart work with chartify, as at apply time helm template expressions that involved Capabilities.APIVersions are already nowhere.
This commit is contained in:
+9
-5
@@ -966,10 +966,13 @@ type ChartPrepareOptions struct {
|
||||
SkipDeps bool
|
||||
SkipResolve bool
|
||||
SkipCleanup bool
|
||||
IncludeCRDs *bool
|
||||
Wait bool
|
||||
WaitForJobs bool
|
||||
OutputDir string
|
||||
// Validate is a helm-3-only option. When it is set to true, it configures chartify to pass --validate to helm-template run by it.
|
||||
// It's required when one of your chart relies on Capabilities.APIVersions in a template
|
||||
Validate bool
|
||||
IncludeCRDs *bool
|
||||
Wait bool
|
||||
WaitForJobs bool
|
||||
OutputDir string
|
||||
}
|
||||
|
||||
type chartPrepareResult struct {
|
||||
@@ -1142,9 +1145,10 @@ func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurre
|
||||
if opts.IncludeCRDs != nil {
|
||||
includeCRDs = *opts.IncludeCRDs
|
||||
}
|
||||
|
||||
chartifyOpts.IncludeCRDs = includeCRDs
|
||||
|
||||
chartifyOpts.Validate = opts.Validate
|
||||
|
||||
out, err := c.Chartify(release.Name, chartPath, chartify.WithChartifyOpts(chartifyOpts))
|
||||
if err != nil {
|
||||
results <- &chartPrepareResult{err: err}
|
||||
|
||||
Reference in New Issue
Block a user