* Add option to throttle concurrent `helm repo update` calls
Have added a new flag `--concurrency N` to `helmfile sync charts` that can be used to set a
limit on the number of concurrent calls to helm.
Implementation details:
Switched `SyncCharts` from using a WaitGroup to using a pool
of workers and a queue of jobs. To ensure that this is thread safe and
an attempt is made to sync each chart at the end.
Fixes#23
* Fix formatting and update CI to catch these errors
Have fixed the formatting so that `make pristine` now passes. Have also
added this to the Circle CI config to catch these errors in the future.
So that we can just reuse release names after `helmfile delete`.
This is verified to work by confirming that `helmfile delete` does add `--purge` flag to `helm delete`:
```
$ helmfile delete
exec: helm delete --purge brigade-project
release "brigade-project" deleted
```
And by confirming that I can now re-install releases from the same charts.yaml without any modification of release names:
```
PROJECT=deis/empty-testbed ENV=staging IMAGE=mumoshu/golang-k8s-aws:1.9.1 COMMAND='go' SERVICE_ACCOUNT=default helmfile sync
Release "brigade-project" does not exist. Installing it now.
NAME: brigade-project
LAST DEPLOYED: Tue Feb 27 15:59:38 2018
NAMESPACE: kube-system
STATUS: DEPLOYED
RESOURCES:
*snip*
```
Fixes#33
This aims to improve on relative, absolute and <repo>/<chart>
resolution for several of Helmfile manifest attributes as well as
command line arguments.
- Uusers may now utilize the `-f <filepath>` flag to reference
a helmfile manifest outside of their PWD and have relative paths
in the the `charts[*].values` and `charts[*].chart` attribute resolve
relative to the manfiest's location properly
- Values provided in the `--values` argument are no longer automatically
assumed as relative path references from PWD but instead are
conditionally joined with the PWD if it is determined they are relative
file paths
- Users may still signify a chart in the `.charts[*].chart` attribute
as they do now by having an explicit `<repo>/<chart>` value
- Simple copy-paste for the most part from sync job. I had started down
the path of adding in a meta PluginCommand directive and trying to make it
more modular, but in the end there are some small differences between
the execution that were a bit difficult to model and it just got ugly.
Figured keeping it simple would be easier to manage
If the chart is in directory, for example, `./my/chart` the `helmfile -f my.yaml sync` will fail.
This PR will check if the chart starts with `/`, `./` or `../` and will transform it in a full path of the chart directory.