Commit Graph

37 Commits

Author SHA1 Message Date
Karl Stoney 93c5d4c219 feat: `helmfile template` (#284)
`helmfile template` runs `helm template` over releases within the helmfiles, and provide you a stream of generated yaml documents of Kubernetes resources via stdout.

Resolves #283
2018-09-04 11:31:43 +09:00
KUOKA Yusuke bb3b44e511
fix: follow up for the relative paths improvement (#262)
Fixes for the bugs that are introduced by #261, that is values.yaml files specified in `values:` have redundant base path in their prefixes, and remaining .dec files after secrets decryption(https://github.com/roboll/helmfile/issues/251#issuecomment-417285854)
2018-08-30 21:59:59 +09:00
KUOKA Yusuke 421299c883
feat: All the paths are relative to helmfile.yaml (#261)
`helmfile lint` works with relative chart reference (#252)
The tempalte function `readFile` accepts the path relative to helmfile.yaml

Resolves #246
Fixes #252
2018-08-30 19:47:52 +09:00
KUOKA Yusuke 79f0e70ce8
fix: avoid "cross-device link" errors while decrypting secrets (#260)
ref https://github.com/roboll/helmfile/issues/251#issuecomment-417166296
2018-08-30 17:20:38 +09:00
KUOKA Yusuke 0c8a89cbaf
fix: coordinate secret decryption (#259)
Fixes #258
2018-08-30 17:03:45 +09:00
Shane Starcher 9b71c64ef2 fix: use temporary file for secret file to prevent deletion collision (#250)
Fixes #167
2018-08-30 09:28:26 +09:00
Simon Li 06a1d245ae Multi-level logging (#185)
Closes #93

Summary of changes:

- Adds the [uber-go-/zap](https://github.com/uber-go/zap) library for leveled logging (69040996e0bcbd2f211d0d8d576147027e928e3b)
- A new CLI arg `--log-level` which can take the values `debug` `info` `warn` `error` `fatal` `panic`. The default is `info`, and the existing `--quiet` flag is treated as `--log-level warn`
- All `helm.exec` calls are preceded by a one-line summary. The current information on the full helm command line arguments `exec: helm exec ... ` is only output at `debug` level. This means sensitive command line arguments which may include passwords and `--set` arguments should be hidden by default.
2018-07-19 11:33:57 +09:00
Hori Ryota 9f57f8be7d Add the option to specify an alternative helm binary (#181)
`helm` may not be version compatible. Add an option to specify an alternative `helm` command on runtime, possibly according to the version of tiller running on your cluster.
2018-07-03 22:19:02 +09:00
Yusuke KUOKA da337e8724 feat: `helmfile diff` also works against non-existent releases
Resolves #127
2018-06-14 22:45:26 +09:00
Johan Lyheden 6856c6e979 Add helmfile lint support (#162)
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
2018-06-14 22:35:09 +09:00
Dan O'Brien 1a4f342f25 Add basic repository authentication (#154)
* basic repository authentication via new `username` and `password` keys

* add warning to readme
2018-05-31 10:42:38 +09:00
Mike Eves 37f6ae8557 Add helmfile test sub-command (#150)
**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
2018-05-22 17:12:48 +09:00
KUOKA Yusuke a7e35b7316
Merge pull request #142 from mumoshu/make-purge-optional
Make purge optional when running "helmfile delete"
2018-05-16 08:59:35 +09:00
Yusuke KUOKA ac70e45bff Fix the helm-diff deprecation warning
Resolves #130
2018-05-11 16:51:44 +09:00
Yusuke KUOKA 3979c18ad3 Make purge optional when running "helmfile delete"
`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
2018-05-11 16:41:02 +09:00
Yusuke KUOKA c41dbc4c9f Force `--reset-values` on sync
Resolves #63
2018-05-11 03:04:36 +09:00
Cedric Meury 579fa4c765 status command retrieves release status 2018-04-27 10:31:29 +02: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
Cedric Meury 1b302db7f8 running update dependencies for local charts 2018-04-01 21:23:31 +02:00
Cedric Meury cef2d26c06 extract method for duplicated code 2018-03-28 01:56:43 +02:00
Cedric Meury baba83b124 renamed New() returns execer instead of interface 2018-03-27 00:03:04 +02:00
Cedric Meury 7f90415689 code style 2018-03-26 00:17:12 +02:00
Cedric Meury 915c190901 a tab snuck in 2018-03-26 00:11:10 +02:00
Cedric Meury 6c6f300423 describing current functionality as tests 2018-03-26 00:06:05 +02: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
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
Yusuke KUOKA a31757ae07 Purge releases on deletion
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
2018-02-27 16:01:06 +09: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
rob boll 07cca09069 use modified cmd args. closes #4 2017-04-20 10:01:16 -04:00
rob boll 0f447d2cb2 Merge pull request #3 from robsonpeixoto/chart-in-local-path
Accept chart in a local path
2017-04-13 22:26:27 -04:00
Robson Roberto Souza Peixoto a61ae2a5b3 Only accept `./` and `../` 2017-04-13 14:30:00 -03:00
Robson Roberto Souza Peixoto dfc4b0293f Accept chart in a local path
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.
2017-04-13 12:53:05 -03:00
rob boll 371ca7f752 fmt 2017-04-12 11:16:12 -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 e5e834f9f0 initial helmfile impl 2016-11-22 12:36:49 -05:00