fix: use config for IncludeNeeds in WriteValues command
- Add IncludeNeeds() to WriteValuesConfigProvider interface - Implement IncludeNeeds() in WriteValuesImpl - Update WriteValues function to use IncludeNeeds and IncludeTransitiveNeeds Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
parent
c03a24f83d
commit
425cf60d9a
|
|
@ -260,11 +260,13 @@ func (a *App) Template(c TemplateConfigProvider) error {
|
|||
func (a *App) WriteValues(c WriteValuesConfigProvider) error {
|
||||
return a.ForEachState(func(run *Run) (ok bool, errs []error) {
|
||||
prepErr := run.withPreparedCharts("write-values", state.ChartPrepareOptions{
|
||||
SkipRepos: c.SkipRefresh() || c.SkipDeps(),
|
||||
SkipRefresh: c.SkipRefresh(),
|
||||
SkipDeps: c.SkipDeps(),
|
||||
SkipCleanup: c.SkipCleanup(),
|
||||
Concurrency: c.Concurrency(),
|
||||
SkipRepos: c.SkipRefresh() || c.SkipDeps(),
|
||||
SkipRefresh: c.SkipRefresh(),
|
||||
SkipDeps: c.SkipDeps(),
|
||||
SkipCleanup: c.SkipCleanup(),
|
||||
IncludeNeeds: c.IncludeNeeds(),
|
||||
IncludeTransitiveNeeds: c.IncludeTransitiveNeeds(),
|
||||
Concurrency: c.Concurrency(),
|
||||
}, func() {
|
||||
ok, errs = a.writeValues(run, c)
|
||||
})
|
||||
|
|
@ -274,7 +276,7 @@ func (a *App) WriteValues(c WriteValuesConfigProvider) error {
|
|||
}
|
||||
|
||||
return
|
||||
}, false, c.IncludeTransitiveNeeds(), SetFilter(true))
|
||||
}, c.IncludeNeeds(), c.IncludeTransitiveNeeds(), SetFilter(true))
|
||||
}
|
||||
|
||||
type MultiError struct {
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@ type WriteValuesConfigProvider interface {
|
|||
SkipDeps() bool
|
||||
SkipRefresh() bool
|
||||
SkipCleanup() bool
|
||||
IncludeNeeds() bool
|
||||
IncludeTransitiveNeeds() bool
|
||||
|
||||
concurrencyConfig
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ func (c *WriteValuesImpl) SkipCleanup() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// IncludeNeeds returns the include needs
|
||||
func (c *WriteValuesImpl) IncludeNeeds() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IncludeTransitiveNeeds returns the include transitive needs
|
||||
func (c *WriteValuesImpl) IncludeTransitiveNeeds() bool {
|
||||
return false
|
||||
|
|
@ -60,3 +65,13 @@ func (c *WriteValuesImpl) IncludeTransitiveNeeds() bool {
|
|||
func (c *WriteValuesImpl) OutputFileTemplate() string {
|
||||
return c.WriteValuesOptions.OutputFileTemplate
|
||||
}
|
||||
|
||||
// SkipDeps returns the skip deps
|
||||
func (c *WriteValuesImpl) SkipDeps() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// SkipRefresh returns the skip refresh
|
||||
func (c *WriteValuesImpl) SkipRefresh() bool {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue