Commit Graph
607 Commits
Author SHA1 Message Date
Craig Dunford eeb61e6174 Support for createNamespace (#1226)
- createNamespace is a new attribute that can be added to helmDefaults
  or an individual release to enforce the creation of a release namespace
  during sync if the namespace does not exist. This leverages helm's
  (3.2+) --create-namespace flag for the install/upgrade command. If
  running helm < 3.2, the createNamespace attribute has no effect.

Resolves #891
Resolves #1140
v0.113.0
2020-04-26 10:41:40 +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`
v0.112.0
2020-04-25 21:10:02 +09:00
Ash Caire 3a19a394ab Add condition release attribute (#1190) 2020-04-23 08:43:34 +09:00
Jesse Glick dcb19f942b Typo: kustommize (#1224) 2020-04-23 08:38:33 +09:00
Eric Bailey 458385d971 Amend examples which broke lock files in README.md (#1225)
Prior to this change, these two examples suggested enclosing a release spec in
an if expression, which breaks the lock file when switching environments.

This change parameterizes `installed` instead of the entire release, thus
preserving the dependency locking functionality.
2020-04-23 08:38:01 +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
v0.111.0
2020-04-18 23:22:23 +09:00
Rene Hernandez e0a793b7c5 New output flag for list command (#1215)
* New output flag for list command

Support output as json
Add new formatters file to handle extrac formatting to its own concern
New config interface to support list command specification

* Fix usage message

* Add error handling for formatters
v0.110.0
2020-04-18 21:11:12 +09:00
Danny Shemesh 71bb7354e7 Fix: populate .Values regardless of prestate success (#1202)
This commit proposes a potential solution for
https://github.com/roboll/helmfile/issues/1201

The gist is that, if prestate rendering fails, for any reason,
we do not populate the .Values in the second pass renderer.

I think that what have been expected in this case is to populate the
.Values irregardless.

pkg/app/two_pass_renderer.go
- Migrated to use finalEnv.GetMergedValues()

pkg/environment/environment.go
- Introduced GetMergedValues, which merges the environment's defaults
and current values, and then casts the keys to string;
This was previously defined in HelmState.Values() - however, as this
method is only concerned with the environment, I think it's more
appropriate for it to sit here.

pkg/state/state_exec_tmpl.go
- Extracted out HelmState.Values() to environment.go, see above
v0.109.1
2020-04-17 09:18:01 +09:00
KUOKA Yusuke 3a34d28d7c fix: helmDefaults.timeout and releases[].timeout not working for helmfile test (#1211)
Fixes #1191
2020-04-17 09:08:21 +09:00
Douglas Hellinger f39d7928bf Put tiller on path for use in helm-tiller plugin (#1198)
Put tiller binary on the path in helm v2.X container image so that helm-tiller plugin will use it instead of duplicating the download of helm tarball and performing version check.
2020-04-14 09:18:18 +09:00
Vadim Bauer e0811dffa2 Update helmfile.yaml example in README (#1189)
- Adds default comments into helmfile.yaml example

- Fixes some typos

Signed-off-by: Vadim Bauer <vb@8gears.com>
v0.109.0
2020-04-10 08:27:09 +09:00
RaymondKYLiuandRaymond Liu 7d11f5dedc feat: add tmpl function required (#1188)
Co-authored-by: Raymond Liu (RD-TW) <raymond_liu@trend.com.tw>
2020-04-10 08:23:42 +09:00
KUOKA Yusuke 870cc03c70 feat: helmfile diff --detailed-exitcode should also detect deletions (#1186)
Resolves #499
Resolves #1072
2020-04-10 08:22:33 +09:00
KUOKA Yusuke 98886df5d2 fix: .Values is missing keys with zero values (#1185)
Ref #1184
v0.108.1
2020-04-10 08:21:23 +09:00
RaymondKYLiuandRaymond Liu 71635caace feat: add option --include-tests for diff and apply command (#1179)
Co-authored-by: Raymond Liu (RD-TW) <raymond_liu@trend.com.tw>
v0.108.0
2020-04-05 17:43:54 +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 9d7d2de6f5 Fix misleading helmfile diff output (#1174)
Fixes #749
v0.107.0
2020-04-04 17:39:20 +09:00
KUOKA Yusuke 04c963d050 feat: Complete helmfile diff output when diff exists (#1173)
Fixes #874
2020-04-04 16:24:01 +09:00
KUOKA Yusuke a2c62c9e73 feat: Emit clear error message instead of panic on empty chart name (#1171)
Resolves #999
2020-04-04 15:32:22 +09:00
KUOKA Yusuke 1654ce4c18 Add regression tests for environment values merge (#1170)
This is a follow-up for #1169 and it also relates to #1168
v0.106.4
2020-04-04 14:27:29 +09:00
KUOKA Yusuke 25aae679b1 Merge pull request #1169 from elodani/master
fix: empty map merge was not working after mergo bump
2020-04-04 14:00:41 +09:00
Daniel Elo d404356230 feat: fix empty map merge after mergo bump
since mergo had been bumped to 0.3.9 an environment value like:
```
affinity: {}
```
was not merged properly (not merged at all) instead it threw an error
that it cannot find the key "affinity" in the environment values even
though it was outputted in debug output as read in properly.
2020-04-03 15:01:27 +02:00
KUOKA Yusuke 51ecd12360 Fix panic while loading environment secrets (#1164)
This fixes a regression in #1160
v0.106.3
2020-03-30 20:13:40 +09:00
KUOKA Yusuke 6643a41ea3 fix: merge environment values by ovewriting with empty values (#1162)
Fixes #1154
v0.106.2
2020-03-29 20:47:23 +09:00
KUOKA Yusuke 35e5454994 Change the helmfile list header "INSTALLED" -> "ENABLED" (#1161)
Resolves #1076
v0.106.1
2020-03-29 19:11:58 +09:00
KUOKA Yusuke 69feadc360 feat: helmBinary in helmfile.yaml (#1160)
* feat: `helmBinary` in helmfile.yaml

Resolves #1083

* Add regression test for `helmfile destroy`
v0.106.0
2020-03-29 17:51:07 +09:00
KUOKA Yusuke f676c61425 feat: Better exec error reporting (#1159)
Enhances Helmfile to print more helpful message on error while calling `exec` template function.

Helmfile has been printing error messages like the below:

```
in ./helmfile.yaml: error during helmfile.yaml.part.0 parsing: template: stringTemplate:5:8: executing "stringTemplate" at <exec "./exectest.sha" (list)>: error calling exec: exit status 1
```

Adding captured stdout and stderr, with some indentation to make it readable, it now produces the following message on missing executable:

```
$ make build && ./helmfile build
go build
in ./helmfile.yaml: error during helmfile.yaml.part.0 parsing: template: stringTemplate:5:8: executing "stringTemplate" at <exec "./exectest.sha" (list)>: error calling exec: fork/exec ./exectest.sha: no such file or directory

COMMAND:
  ./exectest.sha

ERROR:
  fork/exec ./exectest.sha: no such file or directory
```

On non-zero exit status without output:

```
$ make build && ./helmfile build
go build
in ./helmfile.yaml: error during helmfile.yaml.part.0 parsing: template: stringTemplate:5:8: executing "stringTemplate" at <exec "./exectest.sh" (list)>: error calling exec: exit status 1

COMMAND:
  ./exectest.sh

ERROR:
  exit status 1
```

On non-zero exit status with output:

```
$ make build && ./helmfile build
go build
in ./helmfile.yaml: error during helmfile.yaml.part.0 parsing: template: stringTemplate:5:8: executing "stringTemplate" at <exec "./exectest.sh" (list)>: error calling exec: exit status 2

COMMAND:
  ./exectest.sh

ERROR:
  exit status 2

COMBINED OUTPUT:
  out1
  err1
```

Resolves #1158
v0.105.0
2020-03-29 10:49:02 +09:00
KUOKA Yusuke 20a39e9412 Bump mergo to 0.3.8 (#1153)
Fixes #1150
v0.104.0
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
v0.103.0
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
KUOKA Yusuke 499f6ec6e3 Add Sportradar to USERS.md (#1133) 2020-03-05 08:09:17 +09:00
KUOKA Yusuke bf22502a2f feat: add helmfile template --validate (#1135)
This adds the ability for helmfile to call `helm template --validate` introduced in helm 3.

fixes #1105
2020-03-05 08:07:02 +09:00
Eric Bailey 7c80a859fa Fix awkward dependency error message (#1130) 2020-03-02 08:23:03 +09:00
Gleidson Nascimento 00c4422a64 Add validation for empty repository names (#1128)
Resolves #1112
2020-02-28 19:42:15 +09:00
KUOKA Yusuke af44965949 feat: helmfile --log-level=debug apply --retain-values-files (#1127)
`--retain-values-files` prevents temporary values files that were passed to Helm commands run by Helmfile for debugging purpose.

With that, you can manually rerun helm commands that were logged when `--log-level=debug` is enabled.

Resolves ##1117
2020-02-28 19:39:01 +09:00
KUOKA Yusuke 0186254e79 feat: --detailed-exitcode for helmfile apply (#1120)
Resolves #1113
v0.101.0
2020-02-26 21:09:05 +09:00
jfreeland 8acbbc596d new here, fixing very minor typo (#1121) 2020-02-26 10:33:35 +09:00
KUOKA Yusuke f1bdb65777 fix: delete/destroy ordering within directory (#1119)
Fixes #979
v0.100.2
2020-02-25 09:46:01 +09:00
Mark Henneman 322ed4d1d8 fix explanation about secrets in .Environment.Values (#1116) 2020-02-24 17:00:11 +09:00
刘相轩 c4e6160220 Remove unneeded env HELMFILE_HELM3 since #963 (#1109) 2020-02-21 00:12:26 +09:00
KUOKA Yusuke 10f2a576c5 fix: helmfile -n ns statuses should set ns for helm 3 (#1108)
This fixes the issue reported in Slack https://sweetops.slack.com/archives/CE5NGCB9Q/p1582088381195000
v0.100.1
2020-02-20 22:30:02 +09:00
chenrui 2579a876a6 Upgrade deps (#1100)
* Upgrade helm3 to v3.1.0

* Upgrade helm2 to v2.16.1

* Use golang v1.13.7
v0.100.0
2020-02-17 08:43:14 +09:00
Alex Jones 6b3277ce71 Added AMEX to USERS.md (#1101) 2020-02-17 08:41:41 +09:00
Anton Trifonov 27425bc4d2 Fix status command for helm 3 (#1098) v0.99.1 2020-02-13 08:40:20 +09:00
Emil 05add478c1 Add option to suppress diff on apply (#1092)
* Add option to suppress diff on apply

Add --supress-diff option on apply. Usable for fresh installs when a
lot of output is produces by diff.

Resolves #458

* fix tests for suppress-diff
v0.99.0
2020-02-05 21:29:55 +09:00
abdennour 757e748e3f Feature/autobuild docker image for each release thru dockerhub auto builds (#886)
* feat: build hook for dockerhub autobuilds

* release new image

* Create pre_build

* Update push
v0.98.3
2020-02-03 08:45:51 +09:00
chenrui e6f1db128c Upgrade alpine to 3.11 (#1085) 2020-02-03 08:43:25 +09:00
Daniel Poelzleithner 5fb037c8e3 Fix crash on missing chart (#1087)
When chart is not set, an exception without any hints occure due
normalizeChart tries to access the first character of a 0 length string.
Properly inform user of missing chart.
2020-02-03 08:42:54 +09:00
Guillaume Lecerf 5abbdea059 Fix "Merging Arrays in Layers" doc example (#1084) 2020-02-03 08:42:16 +09:00