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:
Yusuke Kuoka
2021-09-14 04:48:21 +09:00
committed by GitHub
parent 0f91f2c9cf
commit e1cabc82e3
6 changed files with 27 additions and 7 deletions
+3
View File
@@ -172,6 +172,7 @@ func (a *App) Diff(c DiffConfigProvider) error {
SkipRepos: c.SkipDeps(),
SkipDeps: c.SkipDeps(),
IncludeCRDs: &includeCRDs,
Validate: c.Validate(),
}, func() {
msg, matched, affected, errs = a.diff(run, c)
})
@@ -238,6 +239,7 @@ func (a *App) Template(c TemplateConfigProvider) error {
SkipDeps: c.SkipDeps(),
IncludeCRDs: &includeCRDs,
SkipCleanup: c.SkipCleanup(),
Validate: c.Validate(),
}, func() {
ok, errs = a.template(run, c)
})
@@ -392,6 +394,7 @@ func (a *App) Apply(c ApplyConfigProvider) error {
WaitForJobs: c.WaitForJobs(),
IncludeCRDs: &includeCRDs,
SkipCleanup: c.RetainValuesFiles() || c.SkipCleanup(),
Validate: c.Validate(),
}, func() {
matched, updated, es := a.apply(run, c)
+2
View File
@@ -57,6 +57,7 @@ type ApplyConfigProvider interface {
DiffOutput() string
RetainValuesFiles() bool
Validate() bool
SkipCleanup() bool
SkipDiffOnInstall() bool
@@ -90,6 +91,7 @@ type DiffConfigProvider interface {
Values() []string
Set() []string
Validate() bool
SkipCRDs() bool
SkipDeps() bool