Commit Graph

139 Commits

Author SHA1 Message Date
Yusuke Kuoka f65d1e6b05
Bump chartify to v0.9.3 (#2113)
This release fixes a few issues, including a regression introduced in the previous version of chartify v0.9.2.

See https://github.com/variantdev/chartify/releases/tag/v0.9.3 for more information.
2022-03-24 10:36:01 +09:00
Yusuke Kuoka 185bc82992
Bump chartify to v0.9.2 (#2102)
This should fix a few issues, most notably that adhoc dependencies breaks when some of original chart dependencies are unresolvable with `helm dep up` and/or `helm dep build`.

https://github.com/variantdev/chartify/releases/tag/v0.9.2
2022-03-14 19:25:08 +09:00
Yusuke Kuoka dbc40f68b8
Make release template to work on `needs` (#2099)
It turned out that Helmfile has never had support for release template on `needs`.
This adds that, along with the new end-to-end test suite to verify helmfile template output with snapshot testing involving a real `helmfile build` command.

Ref #2098
2022-03-10 18:42:55 +09:00
Graeme Gillies 8bdf377be0
Bump sprig library to v3.2.1 (#1880)
Fixes #1646

This will allow us to use the new `fromJson` and `mustFromJson` functions
among others.

Co-authored-by: Graeme Gillies <ggillies@gitlab.com>
2022-01-10 17:04:08 +09:00
Simon Caron 578c559640
Bumped go-getter to v1.5.9 (#1982)
Co-authored-by: Simon Caron <simon.caron@protonmail.com>
2022-01-07 09:00:29 +09:00
Ian Muge 554cbc19f5
upgrade vals allowing for the use of the AzureRM terraform backend (#2029) 2022-01-07 08:57:33 +09:00
Yusuke Kuoka 9efb7afb47
Do fail on a possible typo in `needs` entries (#2026)
* Do fail on a possible typo in `needs` entries

Helmfile kindly fails with a friendly error when you made a typo in a `needs` entry, i.e. a `needs` entry included a reference to a release that is not defined in the helmfile config.

Example Output:

```
in ./helmfile.needs.yaml: release(s) "app" depend(s) on an undefined release "infrastructure/cert-manager2". Perhaps you made a typo in `needs` or forgot defining a release named "cert-manager2" with appropriate `namespace` and `kubeContext`?
```

This prevents issues like #1959

* Fix regression in helmfile-diff (This may break when you had two or more duplicated releases that are intended to be de-duplicated before DAG calculation using selectors

* Fix regression when you used selector to deduplicate releases before DAG calculation

* Comments

* Fix regressions in helmfile-apply and helmfile-sync

* Fix regression in duplicate release detection
2021-12-18 17:44:55 +09:00
Yusuke Kuoka f57b510d01
Fix json patches and strategic patches to do work when there was only one resource in the targeted chart/directory (#1962)
Ref https://github.com/roboll/helmfile/issues/1954
2021-09-14 14:48:20 +09:00
Yusuke Kuoka e1cabc82e3
Add support for --validate on chartify (#1960)
Apparently we needed to pass `--validate` on helm-template run by chartify when the targeted chart contains Capabilities.APIVersions in a chart template. Otherwise, you can never make such chart work with chartify, as at apply time helm template expressions that involved Capabilities.APIVersions are already nowhere.
2021-09-14 04:48:21 +09:00
Yusuke Kuoka c623730374
Bump golang.org/x/crypto (#1877)
Resolves #1876
2021-06-10 09:16:11 +09:00
Yusuke Kuoka 72e71608b1
Fix chartify regression of missing chart dependencies (#1869)
* Fix chartify regression of missing chart dependencies

Fixes https://github.com/roboll/helmfile/issues/1867

* Add integration test cases for issues #1857 and #1867
2021-06-08 13:06:26 +09:00
Yusuke Kuoka 1a109f7400
Fix chartify inability to disable chart dependency (#1861)
Fixes #1857
2021-05-24 08:31:09 +09:00
Yusuke Kuoka cb7fa6bf63
Bump vals to 0.14.0 (#1832)
This release includes new `ref+tfstates3://` and `ref+tfstategs://` backends for reading terraform states stored in s3 and google cloud storage, and features a new aws-sdk-go that supports AWS SSO, and the fix to allow referencing a local tfstate file by the absolute path.

See https://github.com/variantdev/vals/releases/tag/v0.14.0 for all the changes.
2021-05-08 17:33:37 +09:00
Yusuke Kuoka 204f78c8ff
Fix --set and --set-file flags are not passed to chartify (#1803)
Fixes #1681
Ref 286ed08a27
2021-04-24 22:27:53 +09:00
Yusuke Kuoka 59b91a45a0
Fix adhoc dependencies not working with remote chart (#1802)
Fixes #1680

Ref 8ff30374cb
2021-04-24 21:11:07 +09:00
Yusuke Kuoka ce6a621414
Bump chartify to 0.8.3 to fix it not to break when two or more releases sharing the same chart and the namespace, but kubeContext (#1799)
Fixes #1695
2021-04-24 19:03:13 +09:00
Yusuke Kuoka 28ade19419
Bump chartify to 0.8.2 (#1793)
* Bump chartify to 0.8.2

This version fixes charitfy not to fail when you used the combination of (1)helm 3 and (2)strategicMergePatches/jsonPatches/transformers etc that triggers chartify on (3)a chart that contains CRDs.

See https://github.com/roboll/helmfile/issues/1778#issuecomment-824451990 for details of the issue.

The chartify-side of this fix is 55b23f9e9d

Fixes #1778
2021-04-23 09:53:52 +09:00
Yusuke Kuoka 30e0356ad6
Bump chartify to 0.8.1 (#1787)
This version fixes that chartify not to fail when the target chart misses `templates` directory.
2021-04-23 09:16:59 +09:00
Yusuke Kuoka 5d43b30a7c
Add --{include,skip}-needs to various helmfile commands (#1772)
* Add --{include,skip}-needs to helmfile-sync and helmfile-apply

* Add --include-needs to helmfile-template

* Add TODO related to #1018

* Add a few new test files to cover new functionalities

* Update apply test to incorporate the change that the destroy and sync steps target affected releases only
2021-04-20 23:06:51 +09:00
Yusuke Kuoka 81b04fcb8b Add support for adhoc dependency to local chart
Helmfile has been providing a feature called "adhoc chart dependency" that basially enabled you to add Chart.yaml `dependencies` entry adhocly without forking or modifying the chart.

It was missing the support for using a local chart as the adhoc dependency. This patch adds that.

Usage:

`releases[].dependencies[].chart` is enhanced to accept the fs path to the local chart:

```
releases:
- name: foo
  chart: ./path/to/foo
  dependencies:
  - chart: ./path/to/bar
```

Resolves #1762
2021-04-10 16:09:27 +09:00
Yusuke Kuoka 2ff06a8abd
Fix chartify to take --include-crds into account (#1761)
Fixes #1760
2021-04-08 10:06:34 +09:00
Yusuke Kuoka d703e17239
Fix chartify not to fail on a chart with dependencies (#1759)
Manually verified to work by using the following example from @damoon (https://github.com/roboll/helmfile/issues/1655#issuecomment-801122431):

```
repositories:
  - name: prometheus-community
    url: https://prometheus-community.github.io/helm-charts
releases:
- name: metrics
  namespace: monitoring
  chart: prometheus-community/kube-prometheus-stack
  version: 13.13.0
  jsonPatches:
    - target:
        version: v1
        kind: Service
        name: metrics-kube-prometheus-st-kube-etcd
        namespace: kube-system
      patch:
        - op: replace
          path: /spec/ports/0/port
          value: "2381"
        - op: replace
          path: /spec/ports/0/targetPort
          value: "2381"
```

Before this fix:
```
$ helmfile template
(snip)
COMBINED OUTPUT:
  Error: found in Chart.yaml, but missing in charts/ directory: kube-state-metrics, prometheus-node-exporter, grafana
```

After this fix:

```
$ helmfile template | grep 2381
(snip)
Removing /tmp/chartify718204429/monitoring-metrics-f5479c8b8/kube-prometheus-stack/strategicmergepatches
Removing /tmp/chartify718204429/monitoring-metrics-f5479c8b8/kube-prometheus-stack/kustomization.yaml
Templating release=metrics, chart=/tmp/chartify718204429/monitoring-metrics-f5479c8b8/kube-prometheus-stack
    port: "2381"
    targetPort: "2381"
```

Fixes #1655

Ref 07c3054d66
2021-04-08 07:03:18 +09:00
Yusuke Kuoka 3bfcc1ea42
Add support for kustomize v4 (#1758)
We use kustomize in two places. One for turning kustomize into a chart, and another for patching manifests and the chart.

This fixes the former to work with kustomize v4.

Fixes #1688
2021-04-08 06:15:16 +09:00
Yusuke Kuoka f614e8b1bf
feat: Helmfile renders *.yaml.gotmpl in a K8s manifests/kustomization directory (#1745)
Related to #494

This feature is mostly a built-in alternative to the `incubator/raw` chart without external dependency and has
access to helmfile's own template functions and template data.

The expected use-case of this feature is to add arbitrary K8s resources to your deployment.

Unlike the original issue raised in #494 this doesn't enable you to add arbitary resources to a release. That's another story. But this would be a good foundation for that, too.
2021-04-06 14:22:34 +09:00
astorath aafe74a3e1
Fix/secrets ordering (#1726)
Fixes issue introduced in #790: the order of secrets merged is not defined now, leading to unpredictable results in `helmfile apply`.
2021-03-23 18:00:57 +09:00
Yusuke Kuoka 4e1ecb5890
Bump variantdev/vals to 0.13.0 (#1666)
Ref https://github.com/variantdev/vals/pull/42
2021-02-03 09:00:46 +09:00
Chris Mellard 8212b630ff
fix: fixed up OCI repos so they support paths and URLs that differ from chart names contained there (#1661) 2021-01-28 19:11:12 +09:00
Yusuke Kuoka f7a1d09be7
Bump variantdev/vals to 0.12.0 (#1644)
For Azure KeyVault support for the fix for AWS SSM provider.
2021-01-12 10:20:57 +09:00
Yusuke Kuoka 9b64d65d94
feat: Stabilize helmfile-diff output (#1622)
This finishes the work started at #1619 by introducing the following changes:

- You can now set `HELMFILE_TEMPDIR` and `CHARTIFY_TEMPDIR` as the directory to persist temporary values files rendered by helmfile and temporary charts generated by chartify. Note that chartify is used internally when you use kustomize integration or raw K8s manifests as a chart.
- Helmfile uses the hash sum of the release config and the values file content in the file name of the temporary values file.

  In combination with `HELMFILE_TEMPDIR` and `CHARTIFY_TEMPDIR`, this enables helmfile to use the stable file names for temporary values files, which contribute to stabilize log messages like `Comparing release=appset, chart=PATH/TO/TEMPORARY/CHART`, where the `PATH/TO/TEMPORARY/CHART` had been randomized due to formerly random helmfile tempdir and temporary values file names, and random chartify tempdir.

You can try this feature with a script like:

```
tempdir=$(mktemp -d -t helmfile)

HELMFILE_TEMPDIR=${tempdir} CHARTIFY_TEMPDIR=${tempdir} helmfile diff

rm -rf ${tempdir}
```
2020-12-15 10:24:27 +09:00
Yoann Ciabaud 54eb73b423
Use ghodss/yaml for yaml marshaling & unmarshaling in template (#1556)
Fixes #1555

Co-authored-by: Yoann Ciabaud <yoann@linxo.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2020-12-13 11:03:20 +09:00
Yusuke Kuoka b910591e1d
Add support for Kustomize Transformers (#1592)
Please see the updated `advanced-features.md` for more details.

This is often used for adding common labels and annotations to any resources rendered from a Helm chart.
2020-11-19 09:33:05 +09:00
Yusuke Kuoka f6bf885fb7
Fix `helmfile template --include-crds` not to break with `chartify` (#1583)
* Fix `helmfile template --include-crds` not to break with `chartify`

This bumps variantdev/chartify to 0.4.9 so that we can incorporate fed8bb2953

* Fix integration test
2020-11-12 09:26:43 +09:00
Yusuke Kuoka 709913b5ea
Bump dependencies (#1573)
Bumps dependencies mainly to fix possible go mod error that is fixed via 0edd534322, but also bumps all the other dependencies because they looked very outdated :)
2020-11-09 08:50:00 +09:00
Yusuke Kuoka 0663831dd5
Disable dependency update while running helm-x/chartify in more cases (#1548)
`helm dep up` is now skipped while running helm-x/chartify when the chart/directory is obtained by running go-getter, or `skipDeps` is configured using a command-line flag, helmDefaults, or release configuration.

Resolves #1547
2020-10-25 11:25:59 +09:00
Yusuke Kuoka 080080f57f
Bump chartify to 0.4.4 (#1540)
To incorporate the fix for unconventional chart templates like seen in the Datadog chart 5443ca1a1d
2020-10-15 10:17:37 +09:00
Yusuke Kuoka 563fce4adf
Bump vals (#1537)
To incorporate unexpected SSM secret exposure issue when the parameter version is specified.
See https://github.com/variantdev/vals/pull/37
2020-10-14 09:56:17 +09:00
Yusuke Kuoka 34acf14d7c
Bump chartify to v0.4.3 (#1528)
This fixes the bug that generated Chart.yaml misses the `apiVersion` field which resulted in `helm lint` always failing on the generated chart.

Fixes #1527
2020-10-12 09:23:58 +09:00
Wi1dcard 5d8eba9b29
Append --force-update for specific helm versions. (#1494)
* Parse and process helm version using github.com/Masterminds/semver/v3.

* Add --force-update only when Helm version >= 3.3.2, < 3.3.4.

See: https://github.com/helm/helm/pull/8777.

* Add test cases.
2020-10-12 09:20:55 +09:00
Yusuke Kuoka 5dd65e8d9a
Bump vals (#1475)
Ref https://github.com/variantdev/vals/issues/34
2020-09-14 20:37:51 +09:00
Johannes Alkjær 9d2c0d4285
Bump sprig to v3.1.0 and mergo 3.11 (#1456)
* Bump sprig to v3.1.0
test for mergeOverwrite

* Let mergo not (accidentally) try to merge unexported fields

This is also a good chance separate `HelmState` with the config loaded from YAML, which I had been wanting to do for a long time.

Co-authored-by: Johannes Alkjær <johannes.alkjaer@wunderman.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2020-09-04 09:58:54 +09:00
Yusuke Kuoka efd26f288a
Bump sprig to v3 (#1452)
Resolves #1294
Resolves #1447
2020-09-01 19:10:29 +09:00
Yusuke Kuoka 94e01b79e0
Bump chartify to 0.4.2 (#1437)
To fix the issue that adhoc json patches were not working on kustomize/raw manifests.

Note that regular kustomize project was working. In other words, this only affetcts `chart: path/to/dir` combined with `jsonPatches: ...` when the `path/to/dir` points to a kustomize project or a local directory containing raw K8s manifests.

Ref https://github.com/roboll/helmfile/issues/1434#issuecomment-682247709
2020-08-28 21:13:04 +09:00
KUOKA Yusuke a9aa7af572
Fix regression installing raw K8s manifests (#1417)
Fixes #1413
2020-08-14 19:52:00 +09:00
KUOKA Yusuke ab1c118022
Bump chartify to v0.4.0 (#1409)
* Bump chartify to v0.4.0

Should fix #1338

* Bump minimum Helm 3 version to v3.1.0 for `helm template --include-crds`
2020-08-12 09:52:51 +09:00
KUOKA Yusuke 1671b8ba7d
Bump variantdev/vals for better Variant KV v2 support (#1367)
Ref https://github.com/variantdev/vals/pull/33
2020-07-21 07:17:40 +09:00
KUOKA Yusuke 608ba19c3c
Bump chartify to 0.3.11 (#1366)
Fixes #1365
2020-07-21 04:56:27 +09:00
KUOKA Yusuke 34f6d4d568
Bump chartify to 0.3.10 (#1363)
Fixes #1360
2020-07-19 20:08:18 +09:00
KUOKA Yusuke 68c51d8c16
Bump variantdev/vals to 0.9.3 (#1361) 2020-07-18 22:28:37 +09:00
KUOKA Yusuke 4bbb1699a3
Bump variantdev/chartify to 0.3.8 (#1359)
Fixes #1335
2020-07-17 09:41:05 +09:00
KUOKA Yusuke cd427d9714
Bump variantdev/vals to 0.7.1 (#1332)
To incorporate the tfstate provider fix

Ref https://github.com/roboll/helmfile/issues/505#issuecomment-653848769
2020-07-06 08:30:19 +09:00
KUOKA Yusuke 8de9b70b33
Bump variantdev/vals to 0.6.0 (#1311)
- Add `version` parameter for Vault provider
- Add `profile` parameter for AWS SSM/SecretsManager provider
= Add `version` parameter for AWS SSM Parameter Store provider
- Add support for app-role authentication when using Vault provider
2020-06-16 09:07:04 +09:00
ento face92536c
Add integration test for Kustomize inetgration (#1288)
Summary of changes:

* Output any error from Mkdir in `helmfile template`

* Add failing test for .Release.Name interpolation

* Add golden files for testing

* Parse resources with kustomize to compare them structure by structure

* Decode resources into plain maps

The RNode type from kustomize uses yaml.Node under the hood,
which carries extra information like line numbers, which
become noisy when comparing with deep.Equal.
2020-06-16 09:06:52 +09:00
KUOKA Yusuke 63c8df9873
Fix missing resources in `hemlfile template` with jsonPatches (#1290)
Probably this has been affecting strategicMergePatches and dependencies as well, as the source of the problem is the underlying common feature called helm-x that previsouly used `helm template --output-dir`, which turned out to be not working as intended.

Ref #1279
2020-06-01 22:54:11 +09:00
KUOKA Yusuke 3284df2752
Bump variantdev/chartify to fix kustomize support (#1280)
Fixes #1279
2020-05-29 10:08:09 +09:00
KUOKA Yusuke e607bae5ff
Fix ignored chart version on patched release (#1276)
See https://sweetops.slack.com/archives/CE5NGCB9Q/p1590607083301900?thread_ts=1590237129.290300&cid=CE5NGCB9Q
2020-05-28 20:52:56 +09:00
KUOKA Yusuke 16288dfa7d
feat: GA of Kustomize and K8s manifests support (#1172)
This is the GA version of the helm-x integration #673 developed last year.

You get all the following benefits without an extra helm plugin:

- Ability to add ad-hoc chart dependencies/aliases, without forking the chart (Fixes #876 )
- Ability to patch resulting K8s resources before installing the helm chart
- Ability to install a kustomization as a chart (Requires `kustomize` binary to be available in `$PATH`
- Ability to install a directory of K8s manifests as a chart
- etc.
2020-05-27 11:42:43 +09:00
Rick Stokkingreef c72cab80b5
Bump variantdev/vals for Vault AppRole support (#1239)
Co-authored-by: Rick Stokkingreef <rick.stokkingreef@takeaway.com>
2020-05-02 09:40:16 +09:00
Marcin Kaciuba b1190508b2
feat(template): added secret template function (#1221)
* feat(tmpl): added fetchSecretValue template function

This adds a tmpl `fetchSecretValue` and `expandSecretRefs` function by:
- Adding:
    - `expandSecretRefs` function in tmpl package that uses vals
    package to fetch secrets
    - `fetchSecretValue` function in tmpl package like below but for
    single string value
    - gomock for tests purpose
- Changing:
    - move init of vals package to function (so the same instance can be used for template values and rendering the whole template)

* doc(secret): added doc how to use new tmpl methods

Added example usage of `fetchSecretValue` and `expandSecretRefs`
2020-04-25 21:10:02 +09:00
chenrui b89fba1cc2
Bump golang to v1.14.2 (#1132)
* Bump golang to v1.14.2

* Use gotest.tools/v3
2020-04-21 09:06:29 +09:00
KUOKA Yusuke 6b6b86a0b5
Bump variantdev/vals to v0.4.0 (#1217)
For GCP Secrets Manager support
2020-04-18 23:22:23 +09:00
KUOKA Yusuke 486be0970d
Bump vals to 0.3.0 (#1175)
vals v0.3.0 introduces the terraform output source that can be accessed by `ref+tfstate://path/to/tfstatefile/type.resourcename.prop` syntax. Please see the updated README section of vals for more info.
2020-04-04 19:50:01 +09:00
KUOKA Yusuke 6643a41ea3
fix: merge environment values by ovewriting with empty values (#1162)
Fixes #1154
2020-03-29 20:47:23 +09:00
KUOKA Yusuke 20a39e9412
Bump mergo to 0.3.8 (#1153)
Fixes #1150
2020-03-20 18:56:43 +09:00
KUOKA Yusuke 048c79ad34
Bump variantdev/vals to 0.2.0 (#1152)
For support for the advanced AWS profile usage in retrieving AWS SSM params/secrets https://github.com/variantdev/vals/issues/19
2020-03-20 16:00:21 +09:00
KUOKA Yusuke 994e4b66fc
fix: `exec` template func should not throw away stdout when stdin is non empty (#1151)
Fixes #1149
2020-03-20 12:23:34 +09:00
刘相轩 4b1b19f8a6 feat: Persist Helmfile version in helmfile.lock for version compatibility check (#1016)
Reslove #698
2019-12-11 09:19:18 +09:00
KUOKA Yusuke 25599eae89
Fix ref url in values key to actually work (#998)
Sorry it was not working at all :(

See https://github.com/roboll/helmfile/issues/990#issuecomment-557756343 for how this is supposed to work.

Fixes #990
2019-11-23 11:36:44 +09:00
KUOKA Yusuke 7ec92c0520
Bump variantdev/vals (#991)
For the new feature that allows you to merge-in YAML/JSON objects stored in a secret store.

Resolves #990
2019-11-21 22:10:21 +09:00
KUOKA Yusuke 8a2311d033
Bump variantdev/vals (#985)
To accomodate the fix for https://github.com/variantdev/vals/issues/13
2019-11-20 08:32:01 +09:00
KUOKA Yusuke 468b9b659d
Fix random "expansion errors" in large values contained in `values` (#974)
Those are not actually random but would have looked like so. We use an external go pkg `variantdev/vals` to expand urls like `ref+vault://foo/bar` contained in release values into their respective secret values.

There was a bug in `vals` that it tries to expand unintended types of strings which resulted in confusing errors like reported in #973.

`vals` fixed the issue in ba4c7a2987. This commit upgrades `vals` to accomodate that.

Fixes #973
2019-11-17 09:37:45 +09:00
KUOKA Yusuke 3f02b86640
fix: Fix `needs` to work for upgrades and when selectors are provided (#922)
* fix: Fix `needs` to work for upgrades and when selectors are provided

Fixes #919

* Add test framework for `helmfile apply`

* Various enhancements and fixes to the DAG support

- Make the order of upgrades/deletes more deterministic for testability
- Fix the test framework so that we can validate log outputs and errors
- Add more test cases for `helmfile apply`, along with bug fixes.
- Make sure it fails with an intuitive error when you have non-existent releases referenced from witin "needs"
2019-11-02 14:04:16 +09:00
KUOKA Yusuke 78bc481675
Fix SSM integration (#915)
The fragment variant of the URIs e.g. `foo: ref+awsssm://path/prefix#key` was not working. This change fixes that by bumping `vals` which is the library providing the SSM support, along with other dependencies.
2019-10-30 16:57:56 +09:00
KUOKA Yusuke 7666e95690
feat: Add `needs: [NS/NAME]` for controlling installation/deletion order declaratively (#914)
Introduces DAG-aware installation/deletion ordering to Helmfile.

`needs` controls the order of the installation/deletion of the release:

```yaml
relesaes:
- name: somerelease
  needs:
  - [TILLER_NAMESPACE/][NAMESPACE/]anotherelease
```

All the releases listed under `needs` are installed before(or deleted after) the release itself.

For the following example, `helmfile [sync|apply]` installs releases in this order:

1. logging
2. servicemesh
3. myapp1 and myapp2

```yaml
  - name: myapp1
    chart: charts/myapp
    needs:
    - servicemesh
    - logging
  - name: myapp2
    chart: charts/myapp
    needs:
    - servicemesh
    - logging
  - name: servicemesh
    chart: charts/istio
    needs:
    - logging
  - name: logging
    chart: charts/fluentd
```

Note that all the releases in a same group is installed concurrently. That is, myapp1 and myapp2 are installed concurrently.

On `helmdile [delete|destroy]`, deleations happen in the reverse order.

That is, `myapp1` and `myapp2` are deleted first, then `servicemesh`, and finally `logging`.

Resolves #715
2019-10-28 12:57:25 +09:00
KUOKA Yusuke b8f24948bb
Bump `vals` to fix Vault integration (#911)
- `replace` for thrift had to be removed to avoid the error `go: github.com/apache/thrift@v0.12.0 used for two different module paths (git.apache.org/thrift.git and github.com/apache/thrift)`
- Other dependencies are updated by running `go get -u github.com/variantdev/vals`
2019-10-28 08:22:04 +09:00
Kyrylo Lebediev 4680010c60 Add integration with Hashicorp Vault, AWS SSM, SecretsManager (#906)
* feat: Add integration with Hashicorp Vault, AWS SSM, SecretsManager

Fields which are rendered: Release.Values, Release.SetValues.Value, Release.SetValues.Values

Example:
```
values:
- foo: ref+vault://mykv/foo?address=http://127.0.0.1:8200#/mykey
set:
- name: xyz
  values:
  - ref+vault://mykv/foo?address=http://127.0.0.1:8200#/mykey3
```

Resolves #881

* feat: Update integration with variantdev/vals

New ref+.\* secret formats are used:
6565695a03 (suported-backends)

Resolves #881
2019-10-25 22:55:26 +09:00
chenrui 76b3a17427 Upgrade to go v1.13.1 (#880) 2019-10-10 16:51:52 +09:00
bitsofinfo cf9bbc7603 upgrade sprig 2.22.0 #883 (#884) 2019-10-05 16:43:40 +09:00
刘相轩 cbf5b8b1e7 Fix helm2 lock file does not get updated (#847)
Ref: https://github.com/helm/helm/issues/2731
2019-09-12 17:58:16 +09:00
chenrui 1823bb1e5b Fix apache thrift location issue (#835)
Relates to Homebrew/homebrew-core#43728
Fixe #834
2019-09-04 12:19:14 +09:00
astorath 11d0abba6e feat: Advanced Templating (#823)
1. Added `helmfile build` command to print final state
Motivation: useful for debugging purposes and some CI scenarios

Ref #780 

2. Template interpolation is now recursive (you can cross-reference release fields) like:
```yaml
templates:
  release:
    name: {{`app-{{ .Release.Namespace }}`}}
    namespace: {{`{{ .Release.Labels.ns }}`}}
    labels:
      ns: dev
```
3. Experimental: Added some boolean release fields interpolation in templates:
```yaml
templates:
  release:
    name: {{`app-{{ .Release.Namespace }}`}}
    namespace: dev
    installedTemplate: {{`{{ eq .Release.Namespace "dev" }}`}}
```

Resolves #818

4. Added more template interpolations: Labels, SetValues
5. Added template interpolation for inline Values
6. Added `helmfile list` command to print target releases in simple tabular form
7. Added release names in some `helm` output messages, e.g.: `Comparing release=%v, chart=%v`
2019-08-31 14:31:31 +09:00
Yusuke Kuoka cd5d906afb fix: clean up invalid remote state file cache
Fixes #815
2019-08-24 09:47:49 +09:00
bitsofinfo 4cc40cf0f1 Upgrade to sprig 2.20.0 and xstrings 1.2.0 (#735)
Needed for new functions and bug fixes

Resolves #733
Resolves #734
2019-07-02 10:12:14 +09:00
KUOKA Yusuke 820abbc06d
feat: remote state files (#648)
This change enhances helmfile to accept terraform-module-like URLs in nested state files a.k.a sub-helmfiles.

```yaml
helmfiles:
- # Terraform-module-like URL for importing a remote directory and use a file in it as a nested-state file
  # The nested-state file is locally checked-out along with the remote directory containing it.
  # Therefore all the local paths in the file are resolved relative to the file
  path: git::https://github.com/cloudposse/helmfiles.git@releases/kiam.yaml?ref=0.40.0
```

The URL isn't equivalent to terraform module sources. The difference is that we use `@` to distinguish between (1) the path to the repository and directory containing the state file and (2) the path to the state file being loaded. This distinction provides us enough fleibiity to instruct helmfile to check-out necessary and sufficient directory to make the state file works.

Under the hood, it uses [hashicorp/go-getter](https://github.com/hashicorp/go-getter), that is used for [terraform module sources](https://www.terraform.io/docs/modules/sources.html) as well.

Only the git provider without authentication like git-credentials helper is tested. But theoretically any go-getter providers should work. Please feel free to test the provider of your choice and contribute documentation or instruction to use it :)

Resolves #347
2019-06-04 22:59:54 +09:00
KUOKA Yusuke 65ee6a2124
fix: "cannot unmarshal !!str `<no value>` into bool" errors in state templates (#645)
Seems like we are affected by https://github.com/golang/go/issues/24963. That is, even though we internally use the template option `missingkey=zero`, in some cases it still prints `<no value>` instead of zero values, which has been confusing the state yaml parsing.

This fixes the issue by naively replacing all the remaining occurrences of `<no value>` in the rendered text, while printing debug logs to ease debugging in the future when there is unexpected side-effects introduced by this native method.

Fixes #553
2019-06-04 13:23:38 +09:00
bitsofinfo 206372b7aa feat: upgrade sprig to 2.16.0
Resolves #630
2019-05-31 13:16:49 +09:00
KUOKA Yusuke 0104c91fce
feat: support for locking the same chart for two or more versions (#600)
Resolves #598
2019-05-16 21:19:30 +09:00
sgandon 4581e004b8 feat(#344): add sub helmfiles explicit selectors (#567)
Fixes #344 by allowing explicit selectors to be specified for composed helmfiles using the following structure

```yaml
helmfiles:
- path: helmfile.d/a*.yaml
  selectors:
  - name=prometheus      
  - name!=zipkin      
- helmfile.d/b*.yaml
- path: helmfile.d/c*.yaml
  selectors: {}
```

2 modes here : 
* legacy mode when no the env var HELMFILE_EXPERIMENTAL is not set to true
  * no selector : inherit from the command line.
  * selector:  is specified then it is used (an emty means no inheritance from command line and take everything).
* experimental when the env var HELMFILE_EXPERIMENTAL=true
  * no selector : nothing is inherited from the command line so use all releases.
  * selector:  is specified then it is used (an emty means no inheritance from command line and take everything).
2019-05-05 13:38:52 +09:00
Yusuke KUOKA fb7e0a360c Update go.mod after running `go mod vendor`
Not sure why `go mod vendor` updates go.mod but `go build .` not
2019-05-04 22:17:16 +09:00
KUOKA Yusuke 8f030d5eab
Bump go to 1.12.4 / Switch to go modules (#564)
* Bump go to 1.12.4 / Switch to go modules

Follow-up for https://github.com/roboll/helmfile/pull/560#issuecomment-486516109
2019-05-02 20:41:36 +09:00