Commit Graph

38 Commits

Author SHA1 Message Date
Bastian Eicher eea4746ae2 Escape names and values before passing to Helm
This is required to handle values with commas and/or curly braces.
2018-05-08 14:43:58 +02:00
Andreas Bieber 77204d9a8c Introduce template function `requiredEnv`
The new template function `requiredEnv` ensures that the given env var is set and not empty.
2018-05-05 21:36:59 +02:00
Cedric Meury 2a1cdb0253 upgrade gopkg.in/yaml from v1 to v2 to strictly unmarshal 2018-04-28 00:17:56 +02:00
Cedric Meury 579fa4c765 status command retrieves release status 2018-04-27 10:31:29 +02:00
KUOKA Yusuke 9b0d0d4cba
Merge pull request #115 from sstarcher/chart_detection
support relative path for is local check
2018-04-26 06:13:22 +09:00
Andreas Bieber 46f119b224 Fix resolving relative paths on windows
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.
2018-04-25 14:40:45 +02:00
Shane Starcher cf01221f3a support relative path for is local check 2018-04-24 09:01:42 -04:00
Shane Starcher 71fa693997 templating the entire helmfile and adding some documentation (#98)
* templating the entire helmfile and adding some documentation

* updating vendor and using dep

* update to golang 1.10

* updating docs
2018-04-10 20:19:43 +09:00
Daniel 2b07b9715e Fix race condition. Add concurrency option similiar to DiffReleases 2018-04-06 16:05:32 +02:00
Daniel 191d9ef1a2 Add envvar interpolation for names and namespaces 2018-04-05 19:05:37 +02:00
KUOKA Yusuke 283848c594
Merge pull request #83 from sstarcher/file_exists
checks for file existence
2018-04-04 16:48:29 +09:00
Shane Starcher b4f9c1ce79 Do delete decrypted secret on sync command (#82)
Due to not passing around the pointer into channels and through the functions, we were not getting back the generatedValues. This fixes that.
2018-04-04 10:22:17 +09:00
Shane Starcher 9ee0f967c8 checks for file existance 2018-04-03 10:03:42 -04:00
Cedric Meury 813fd4bfc7 render environment variables in repository URLs (#78)
* unit test for template rendering

* render env vars in repository urls
2018-04-02 19:16:34 +09:00
Cedric Meury 1b302db7f8 running update dependencies for local charts 2018-04-01 21:23:31 +02:00
Alex Withrow 4b08ea9292 Allow running helmfile against a subset of releases (#30)
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
2018-03-24 01:05:19 +09:00
Shane Starcher ffa39af554 Add secrets support via helm-secrets plugin (#53)
Resolves #41
2018-03-16 22:43:02 +09:00
Greg Burton 1ad426b338 Support client certs when accessing remote repos (#47)
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.
2018-03-10 22:16:31 +09:00
mseashor 412d9244c8 Remove inadvertantly added extra line 2018-03-05 16:15:59 -08:00
mseashor 72eaa2fb62 Add helm add repo synchonously to avoid race conditions with multiple repositories 2018-03-05 16:06:49 -08:00
bob 76dcc6b182 [state] - Fix issue where spec[].Namespace were ignored 2018-03-05 11:05:58 +01:00
KUOKA Yusuke 0fc74ea771
Fix terminology (#35)
In a backward compatible manner, so that (I believe) we could move the discussion made in #25 forward.

Fixes #25
2018-03-03 00:14:43 +09:00
KUOKA Yusuke efdede1658
Allow specifying a default namespace used across all the releases (#39)
* 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
2018-03-01 23:09:02 +09:00
KUOKA Yusuke f02790d566
Fix possible race while templating (#38)
Fixes #32
Fixes #37
2018-03-01 22:54:31 +09:00
Thomas O'Donnell effc747081 Add option to limit concurrent helm calls (#24)
* 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.
2018-03-01 22:39:23 +09:00
jayste c00b869045 Added ability to set context in charts.yaml (#21)
* Added ability to set context in charts.yaml

* Added context to the documentation
Added error if —kube-context and context are both used.
2018-01-02 16:49:02 -05:00
Karl Fischer 5da5cd1c39 Allow env var interpolation in `set` and `values` (#20)
* Allow env var interpolation in `set` and `values`

* Use go templating instead of regex

* Re-add 'env' section for backwards compatibility

* Fix typo
2018-01-02 16:48:45 -05:00
rob boll cce726aee5 formatting 2017-11-05 19:06:09 -05:00
Justin Nauman e386cd0343 Adding in examples for readme 2017-10-03 20:23:55 -05:00
Justin Nauman 2e914c652a Relative path resolution changes
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
2017-09-06 23:03:37 -05:00
Justin Nauman e0b324b69b Adding in diff plugin execution
- 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
2017-08-17 23:49:06 -05:00
Nathan Vecchiarelli 0096904b0d fixed env vars error handling 2017-05-15 10:45:39 -04:00
rob boll 371ca7f752 fmt 2017-04-12 11:16:12 -04:00
Nathan Vecchiarelli 0de9b22485 updated unset env var message to not be confusing 2017-04-12 11:01:45 -04:00
Nathan Vecchiarelli bc8bbf8e01 documentation updates and tweaking workflows with env vars. It now throws errors if they're not set 2017-04-12 10:15:56 -04:00
Nathan Vecchiarelli 373e750642 added support for environment variables, adding value files during runtime and a global kube-context flag to pass down to helm 2017-04-11 19:55:23 -04:00
rob boll d8acc58ea6 state: vet nit 2016-11-22 13:12:08 -05:00
rob boll e5e834f9f0 initial helmfile impl 2016-11-22 12:36:49 -05:00