Commit Graph

161 Commits

Author SHA1 Message Date
xtphate a15a1b0731
Feature/support env hcl and interpolations (#1423)
* support HCL language for env variables

Signed-off-by: xtphate <65117176+XT-Phate@users.noreply.github.com>
2024-04-22 08:02:14 +08:00
Cyril Jouve 8aa524cd93
skip helm dep up for kustomizations (#1424)
skip helm dep up deps for kustomizations

Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>
2024-03-26 07:45:39 +08:00
yxxhero 7c0134fa66
bump helm-diff to 3.9.5 (#1384)
Signed-off-by: yxxhero <aiopsclub@163.com>
2024-03-03 09:45:57 +08:00
yxxhero 9203641f03
feat: add suppress output line regex support (#1329)
* feat: add suppress output line regex support

Signed-off-by: yxxhero <aiopsclub@163.com>
2024-02-18 12:10:14 +08:00
Cyril Jouve 268a4808e9
run deps without chart preparation (#1011)
* nonreg for #1011

Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>

* run deps without chart preparation

Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>

---------

Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>
2024-02-14 17:16:48 +08:00
yxxhero 9192562e1b
feat: Bump helm-diff to 3.9.4 (#1316)
Signed-off-by: yxxhero <aiopsclub@163.com>
2024-01-27 20:40:55 +09:00
coderkou f66fbd7c84
Bump helm diff to 3.9.2 (#1291) 2024-01-17 22:52:12 +08:00
yxxhero 09aced6cb0
feat: bump helm-diff to v3.9.1 (#1286) 2024-01-14 09:33:15 +08:00
yxxhero 3576e7d36b
feat: include func support more template functions (#1277) 2024-01-09 14:33:50 +08:00
Seonghoi Lee 4871a92b8c
fix: prevent preparing chart for disabled releases (#1210)
* fix: prevent preparing chart for disabled releases

Previously, PrepareCharts does not filter any releases whose condition
is disabled with no selectors.

Prevent following things from
- using any unnecessary computing resources for disabled charts
- throwing any error from wrong configurations for disabled charts

Signed-off-by: Seonghoi lee <mighty1231@gmail.com>

* fix: working for integration test about list and build

Some tests require that PrepareCharts without any selector
may not add any labels on the release.

make markExcludedReleases do not add any label without any selectors

Signed-off-by: Seonghoi lee <mighty1231@gmail.com>

* fix: prevent resolved chart version loss

State loss the resolved chart version info from st.Releases
when st.GetSelectedReleases() be called

update st.Releases after st.GetSelectedReleases() in prepareCharts

Signed-off-by: Seonghoi lee <mighty1231@gmail.com>

* fix: preserve resolved version from resolveDeps

In PrepareCharts, the version, resolved from resolveDeps,
is removed after invoking GetSelectedReleases.

Do updateDeps at the first before GetSelectedReleases call

Signed-off-by: Seonghoi lee <mighty1231@gmail.com>

---------

Signed-off-by: Seonghoi lee <mighty1231@gmail.com>
2024-01-02 08:56:07 +08:00
Vladan Pavlovic 22c05f9ed9
feat: respect helmfile.lock with ad-hoc kustimzation (#1244)
* Resolve dependencies before releases are created

Signed-off-by: vlpav030 <vpav.030@gmail.com>

* Add test

Signed-off-by: vlpav030 <vpav.030@gmail.com>

---------

Signed-off-by: vlpav030 <vpav.030@gmail.com>
2023-12-27 19:25:30 +08:00
yxxhero 7d6ed97333
feat: include func support (#1187)
* feat: include func support

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-12-04 21:51:01 +08:00
Maarten Boekhold d0b8d7ee5e
Add "PostRendererArgs" option to be passed to helm (#1133)
* Add "PostRendererArgs" option to be passed to helm

This allows using PowerShell scripts on Windows as Post Renderer.

Signed-off-by: Maarten Boekhold <maarten.boekhold@finastra.com>
2023-11-21 21:32:14 +08:00
yxxhero 0c3951097e
fix #1095 (#1100)
* fix #1095

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-11-01 11:55:55 +08:00
yxxhero 54da9dab87
fix chartify with non-chart dir (#1105)
* fix chartify with non-chart dir

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-10-31 13:45:10 +08:00
yxxhero 9c1cf61559
enable run skip-diff-output tests (#1104) 2023-10-28 21:04:02 +08:00
Felipe Santos 9596790a51
test: fix running tests locally (#1088) 2023-10-23 05:51:40 +08:00
Felipe Santos d58c664776
feat: add duration to failed releases summary (#1066)
Signed-off-by: Felipe Santos <felipecassiors@gmail.com>
2023-10-12 18:49:07 -05:00
Alessio Dionisi ad258463b6
feat: add an option to set a custom kustomize binary (#1012)
Signed-off-by: Alessio Dionisi <me@alessiodionisi.com>
2023-09-13 06:58:53 -05:00
yxxhero e4184a48b4
update keyring docs (#986)
* update docs about keyring

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-08-23 01:17:07 -05:00
yxxhero c3292f141c
fix snapshot tests random error (#985)
* fix snapshot tests random error

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-08-22 21:00:10 -05:00
yxxhero 48e48aa568
feat: add friendly tips for helmfile config order (#710)
* feat: add kindful tips for helmfile config order

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-08-06 22:22:36 +08:00
yxxhero aac734ffd5
fix re-using environment state in sub-helmfiles issue (#951)
* fix re-using environment state in sub-helmfiles issue

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-08-06 21:49:55 +08:00
yxxhero 67ab08ab5e
fix: oci pull directory conflict when download twice (#914)
* fix: oci pull directory conflict when download twice

Signed-off-by: yxxhero <aiopsclub@163.com>

* add test cases
2023-07-23 21:10:03 +08:00
Yusuke Kuoka 858c233272
Cancel rendering helmfile parts once the missing env is detected in the previous part (#941)
* Cancel rendering helmfile parts once the missing env is detected in the previous part

Fixes #913

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2023-07-23 17:23:41 +08:00
Jan-Otto Kröpke d1c260af5f
feat: Allow to skip diff output on release base (#906)
* feat: Allow to skip diff output on release base

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>

* fix tests

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* feat: Allow to skip diff output on release base

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>

* fix tests

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* s/skipDiffOutput/suppressDiff

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* s/skipDiffOutput/suppressDiff

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* fix tests

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>

---------

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
2023-07-02 07:50:59 +08:00
yxxhero c55fa0f765
Replace interface{} by any (#901)
Signed-off-by: yxxhero <aiopsclub@163.com>
2023-06-16 10:49:05 +09:00
yxxhero afcc9e4b80
fix: chartifyOpts ignore release set values (#896)
* fix: chartifyOpts ignore release set values

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-06-13 23:28:27 +08:00
yxxhero 1843cc447e
Add insecure skip tls verify support (#882)
* feat: add insecure-skip-tls-verify support

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-06-04 16:34:24 +08:00
yxxhero e67eb0c973
Upgrade helm diff version (#883)
feat: bump helm diff to v3.8.0

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-06-04 10:29:32 +08:00
yxxhero ae77967bf2
cleanup: remove tls configures about helm v2 (#880) 2023-06-03 22:02:46 +08:00
xiaomudk c498af3f52
Fix set flag are ignored when used in conjunction with jsonPatches (#867)
* Fix set flag are ignored when used in conjunction with jsonPatches

Signed-off-by: xiaomudk <xiaomudk@gmail.com>
2023-05-24 07:29:19 +08:00
yxxhero 643f888703
fix: loadBases overrodeEnv issue (#838) 2023-05-08 05:24:32 +08:00
Dmitry Chepurovskiy aa5be82834
Make helmfile respect signals send by kill command (not only Ctrl+C in terminal) (#750)
Fixes #746 

Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: yxxhero <aiopsclub@163.com>
2023-04-29 15:25:29 +09:00
yxxhero bfb94314be
bump chartify to v0.14.0 (#759)
Signed-off-by: yxxhero <aiopsclub@163.com>
2023-03-21 18:52:42 +08:00
yxxhero 95c56d87fc
v1: Fix --state-values-set to override values of environments colocated with releases (#705) 2023-03-05 16:03:00 +08:00
xiaomudk a8574ba0cf
Fix post-renderer flag not working in diff and template subcommand (#691)
Signed-off-by: xiaomudk <xiaomudk@gmail.com>
2023-02-14 10:47:24 +08:00
Yusuke Kuoka fc027d1538
breaking: Fix the inherit feature to support multi-inheritance (#674)
* breaking: Fix the inherit feature introduced in Helmfile v0.150.0 for multi-inheritance

Follow-up for #435
Addresses https://github.com/helmfile/helmfile/discussions/656#discussioncomment-4877360 towards Helmfile v1

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

* Print a deprecation warning on releases[].inherit of map

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

---------

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2023-02-07 08:18:19 +08:00
yxxhero b44aaf90f7
remove helm v2 code in tests (#648)
Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-01-24 07:02:57 +09:00
yxxhero 1664edd0b9
add --skip-charts for destroy for disable prepare charts (#637)
* add --skip-charts for destroy for disable prepare charts

Signed-off-by: yxxhero <aiopsclub@163.com>

* add --skip-charts for delete subcmd

Signed-off-by: yxxhero <aiopsclub@163.com>

* add docs and e2e test

Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-01-21 11:54:59 +09:00
yxxhero a724ab73f6
fix inherit chart empty check issue (#635)
Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-01-19 09:37:22 +08:00
xiaomudk 1f134d931f
fix fetch does not work with kustomized releases (#624)
* fix fetch does not work with kustomized releases

Signed-off-by: xiaomudk <xiaomudk@gmail.com>

* add tests

Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: xiaomudk <xiaomudk@gmail.com>
Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: yxxhero <aiopsclub@163.com>
2023-01-15 09:19:01 +08:00
Yusuke Kuoka 4688cf0132
Use gopkg.in/yaml.v2 for Helmfile v0.x (#609)
This should fix #435 for Helmfile v0.x releases since the next v0.150.0.
We introduce a new envvar to opt-in to the new YAML library, so that you can give it a shot before upgrading your Helmfile to v1. The same envvar can be used to opt-out of the new YAML library after you upgrade to Helmfile v1, giving you a more flexible migration story.

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2023-01-04 18:17:24 +09:00
Yusuke Kuoka 490bb5d147
feat: `inherit` field for release template inheritance (#606)
* feat: `inherit` field for release template inheritance

Ref https://github.com/helmfile/helmfile/issues/435#issuecomment-1364749414

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

* Fix wording

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

* Comment on releaseWithInheritedTemplate

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

* Update Release Template doc with the new `inherit` feature

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

* Fix a typo in code comment

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-12-28 10:01:04 +09:00
yxxhero d8cb740dcf
fix env value lost in environment values (#605)
* fix env value lost in environment values

Signed-off-by: yxxhero <aiopsclub@163.com>

* add more test

Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
2022-12-27 09:48:07 +08:00
Yusuke Kuoka 6664f01596
Use goccy/go-yaml for v1 / Prep bringing back go-yaml v2 for v0.x (#604)
This is a successor to #596. We need a smooth migration path from `gopkg.in/yaml.v2`, and this pull request moves it forward with `goccy/go-yaml` instead of `gopkg.in/yaml.v3`. Merging this unblocks users stuck in Helmfile v0.146.x or earlier due to #435, so that they can upgrade to 0.147.x or greater without updating their helmfile configs.

We previously tried to upgrade to `yaml.v3` (https://github.com/helmfile/helmfile/issues/394) in Helmfile v0.x, presuming it won't break anything. Apparently, it broke use-cases where you want to layer release's `values` field over three or more release templates and releases (#435).

We then tried to bring back `yaml.v2` for Helmfile v0.x and keep `yaml.v3` for the upcoming Helmfile v1. However, it failed due to incompatibility in the Unmarshaller interface between `yaml.v2` and `yaml.v3` (https://github.com/helmfile/helmfile/pull/596).

`goccy/go-yaml` is, from my observation, a well-maintained alternative to `yaml.v2`. One of its premises is that it enables us to swap the implementation from `gopkg.in/yaml.v2` to `goccy/go-yaml` just by replacing the import directive. It seems to use the same `Unmarshaller` interface as yaml.v2 too.

Once this PR gets merged, I'd like to follow-up with adding a new build-time variable and an envvar to set the proper default for the yaml parser Helmfile uses and the ability to switch the parser at runtime. All in all, the next Helmfile release, v0.150.0 will get reverted to use `gopkg.in/yaml.v2` by default which resolves #435.

New users who started using Helmfile since any of v0.148.0, v0.148.1, and v0.149.0 might be already relying on the new behavior, They might need to specify a new envvar to enable `goccy/go-yaml`.

Signed-off-by: yxxhero <aiopsclub@163.com>
Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: yxxhero <aiopsclub@163.com>
2022-12-27 10:14:35 +09:00
yxxhero d8d0bf830a
Add helmfile state validate policy (#592) 2022-12-21 10:49:31 +08:00
yxxhero 36c91c5427
optimize lint logic (#586)
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-12-18 08:39:45 +08:00
yxxhero 5da1200a8b
add post render integration test (#576)
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-12-14 11:38:47 +08:00
Quan TRAN 7860ac988a
Remove temporary dir as well (#563)
Fixes #540

Signed-off-by: Quan TRAN <account@itscaro.me>
Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: yxxhero <aiopsclub@163.com>
2022-12-14 08:33:07 +09:00