feat: Disable concurrency if any release is using tillerless (#694)
So that you don't need to remember adding `--concurrency 1`
This commit is contained in:
parent
31768b5bac
commit
e0d0a1cf7f
|
|
@ -707,9 +707,6 @@ With the [helm-tiller](https://github.com/rimusz/helm-tiller) plugin installed,
|
|||
To enable this mode, you need to define `tillerless: true` and set the `tillerNamespace` in the `helmDefaults` section
|
||||
or in the `releases` entries.
|
||||
|
||||
Since every commands is run with `helm tiller run ...`, you have to disable concurrency. Otherwise you'll get
|
||||
mysterious errors about the tiller daemon.
|
||||
|
||||
## Separating helmfile.yaml into multiple independent files
|
||||
|
||||
Once your `helmfile.yaml` got to contain too many releases,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,16 @@ func (st *HelmState) scatterGather(concurrency int, items int, produceInputs fun
|
|||
concurrency = numReleases
|
||||
}
|
||||
|
||||
for _, r := range st.Releases {
|
||||
if r.Tillerless != nil {
|
||||
if *r.Tillerless {
|
||||
concurrency = 1
|
||||
}
|
||||
} else if st.HelmDefaults.Tillerless {
|
||||
concurrency = 1
|
||||
}
|
||||
}
|
||||
|
||||
// WaitGroup is required to wait until goroutine per job in job queue cleanly stops.
|
||||
var waitGroup sync.WaitGroup
|
||||
waitGroup.Add(concurrency)
|
||||
|
|
|
|||
Loading…
Reference in New Issue