mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 16:21:44 +02:00
feat: add helmfile template --validate (#1135)
This adds the ability for helmfile to call `helm template --validate` introduced in helm 3. fixes #1105
This commit is contained in:
+1
-1
@@ -1114,7 +1114,7 @@ func (a *App) template(r *Run, c TemplateConfigProvider) (bool, []error) {
|
||||
opts := &state.TemplateOpts{
|
||||
Set: c.Set(),
|
||||
}
|
||||
return subst.TemplateReleases(helm, c.OutputDir(), c.Values(), args, c.Concurrency(), opts)
|
||||
return subst.TemplateReleases(helm, c.OutputDir(), c.Values(), args, c.Concurrency(), c.Validate(), opts)
|
||||
}))
|
||||
|
||||
if templateErrs != nil && len(templateErrs) > 0 {
|
||||
|
||||
@@ -1877,6 +1877,10 @@ func (c configImpl) Args() string {
|
||||
return "some args"
|
||||
}
|
||||
|
||||
func (c configImpl) Validate() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (c configImpl) SkipDeps() bool {
|
||||
return true
|
||||
}
|
||||
@@ -1894,6 +1898,7 @@ type applyConfig struct {
|
||||
values []string
|
||||
retainValuesFiles bool
|
||||
set []string
|
||||
validate bool
|
||||
skipDeps bool
|
||||
suppressSecrets bool
|
||||
suppressDiff bool
|
||||
@@ -1917,6 +1922,10 @@ func (a applyConfig) Set() []string {
|
||||
return a.set
|
||||
}
|
||||
|
||||
func (a applyConfig) Validate() bool {
|
||||
return a.validate
|
||||
}
|
||||
|
||||
func (a applyConfig) SkipDeps() bool {
|
||||
return a.skipDeps
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ type TemplateConfigProvider interface {
|
||||
|
||||
Values() []string
|
||||
Set() []string
|
||||
Validate() bool
|
||||
SkipDeps() bool
|
||||
OutputDir() string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user