Add ability to specify and override helmDefaults.wait via cli (#1678)

This commit is contained in:
Jason Witkowski
2021-02-24 12:47:27 +09:00
committed by GitHub
parent f24b61f100
commit bd3838c059
5 changed files with 30 additions and 1 deletions
+5 -1
View File
@@ -294,6 +294,7 @@ func (a *App) Sync(c SyncConfigProvider) error {
prepErr := run.withPreparedCharts("sync", state.ChartPrepareOptions{
SkipRepos: c.SkipDeps(),
SkipDeps: c.SkipDeps(),
Wait: c.Wait(),
}, func() {
ok, errs = a.sync(run, c)
})
@@ -319,6 +320,7 @@ func (a *App) Apply(c ApplyConfigProvider) error {
prepErr := run.withPreparedCharts("apply", state.ChartPrepareOptions{
SkipRepos: c.SkipDeps(),
SkipDeps: c.SkipDeps(),
Wait: c.Wait(),
}, func() {
matched, updated, es := a.apply(run, c)
@@ -1179,6 +1181,7 @@ Do you really want to apply?
syncOpts := state.SyncOpts{
Set: c.Set(),
SkipCleanup: c.RetainValuesFiles() || c.SkipCleanup(),
Wait: c.Wait(),
}
return subst.SyncReleases(&affectedReleases, helm, c.Values(), c.Concurrency(), &syncOpts)
}))
@@ -1393,7 +1396,8 @@ func (a *App) sync(r *Run, c SyncConfigProvider) (bool, []error) {
subst.Releases = rs
opts := &state.SyncOpts{
Set: c.Set(),
Set: c.Set(),
Wait: c.Wait(),
}
return subst.SyncReleases(&affectedReleases, helm, c.Values(), c.Concurrency(), opts)
}))
+5
View File
@@ -2315,12 +2315,17 @@ type applyConfig struct {
interactive bool
skipDiffOnInstall bool
logger *zap.SugaredLogger
wait bool
}
func (a applyConfig) Args() string {
return a.args
}
func (a applyConfig) Wait() bool {
return a.wait
}
func (a applyConfig) Values() []string {
return a.values
}
+2
View File
@@ -39,6 +39,7 @@ type ApplyConfigProvider interface {
Values() []string
Set() []string
SkipDeps() bool
Wait() bool
IncludeTests() bool
@@ -65,6 +66,7 @@ type SyncConfigProvider interface {
Values() []string
Set() []string
SkipDeps() bool
Wait() bool
concurrencyConfig
loggingConfig