The use case is to have a list of helmfile releases version controlled together with all settings and have a CI pipeline that will lint all releases with settings before running sync. The new functionality was mostly copy pasted from the Diff implementation with some extra handling for fetching remote charts.
Notes:
* Added release name to chart path to avoid potential race condition when fetching the chart
**Feature**
An additional sub-command to the helmfile binary; helmfile test
**Why**
Helm provides helm test (https://github.com/kubernetes/helm/blob/master/docs/chart_tests.md) as a method to run automated tests post chart install to ensure things are working as they should be.
It would be nice to be able to run something like helmfile test against a particular helmfile in order to run helm tests against all charts/releases defined in the file. Either as part of the sync (i.e. helmfile sync --test) to be ran immediately after the corresponding chart is installed, or as a separate command ran after a sync (i.e. helmfile test).
A chart without tests will exit with a 0 status, so it can be safely ran against any charts.
**Notes**
`--cleanup` (bool) & `--timeout` (default: 300) are available as first class arguments. Additional arguments can be passed to the helm binary as with other sub commands using `--args=`
Resolves#144
If an entry in the `values` section of a helmfile is an absolute
path, then it would be erroneously prefixed with the base path.
This would cause `helmfile sync` to fail because the value.yaml file
would not exist at the incorrectly prefixed path.
`helmfile delete` has been implying `--purge` but it is not the case since this change.
The new behavior is `helmfile delete --purge` to actually purge releases.
Run just `helmfile delete` to delete releases but not purge them.
Resolves#71
path.Dir() does not support Windows-style directory separators (backslashes). This caused invocations such as "helmfile -f subdir\helmfile.yml" to fail. Fixed by using filepath.Dir() instead.
This adds `releases[].labels` in which you can set arbitrary number of key-value pairs, so that commands like `helmfile sync --selector key=value` can be used to run the helmfile subcommand against a subnet of declared releases.
`labels` and `selector` are named as such on purpose of being consistent with terminology of Kubernetes and other tools in the K8S ecosystem, including kubectl, stern, helm, and so on.
Resolves#8
This is important for deployments where the chart repo is protected by client cert validation.
helmfile.yaml is extended to support `certFile` and `keyFile`:
```
repositories:
- name: roboll
url: http://roboll.io/charts
certFile: optional_client_cert
keyFile: optional_client_key
```
Everything works the same if you don't provide values for them.
Regarding the implementation, the "helm repo add" command already supports the cert-file and key-file values, so we just have to pass them through.
* Allow specifying a default namespace used across all the releases
Omit `namespace` in `charts[].namespace` of charts.yaml and then run `helmfile sync -n yourns` to install your charts into `yourns`.
Resolves#31
* 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.
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