Commit Graph

46 Commits

Author SHA1 Message Date
yxxhero a76bec234c
refactor(filesystem): add CopyDir method and optimize Fetch function (#2111)
* refactor(filesystem): add CopyDir method and optimize Fetch function

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

* fix(state): conditionally prepare charts for local helmfile command

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

* fix(state): conditionally prepare charts for local helmfile command

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

* refactor(state): optimize chart path generation and update dependencies

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

* fix(test): update path in fetch-forl-local-chart test

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

* add more test cases

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

---------

Signed-off-by: yxxhero <aiopsclub@163.com>
2025-07-28 16:10:25 -04:00
yxxhero fe1e51e5ef
build: update Helm and plugin versions in CI and Dockerfiles (#2059)
* build: update Helm and plugin versions in CI and Dockerfiles

Signed-off-by: yxxhero <aiopsclub@163.com>
2025-05-30 11:45:28 +08:00
yxxhero 5d29f03782
Remove all v0.x references (#1919)
* fix tests

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

* refactor(two_pass_renderer): remove unused imports and functions

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

---------

Signed-off-by: yxxhero <aiopsclub@163.com>
2025-03-08 07:43:21 -06:00
Vince-Chenal e33b4725ea
feat: inject cli state values (--state-values-set) into environment templating context (#1917)
* feat: inject cli state values (--state-values-set) into environment templating context

Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com>

* test: added envvals_loader unit test for environment values

Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com>

* test: added 'state values set cli args in environments' integration test

Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com>

* fix: merge environments before loadValuesEntries

Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com>

* fix: 'state values set cli args in environments' integration test

Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com>

---------

Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com>
2025-02-14 20:49:07 +08:00
yxxhero 63e2684ade
Revert "cleanup: remove all about v0.x" (#1918)
Revert "cleanup: remove all about v0.x (#1903)"

This reverts commit d7bcd5e998.

Signed-off-by: yxxhero <aiopsclub@163.com>
2025-02-08 18:25:16 +08:00
yxxhero d7bcd5e998
cleanup: remove all about v0.x (#1903)
* fix tests

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

* refactor(two_pass_renderer): remove unused imports and functions

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

* fix tests

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

---------

Signed-off-by: yxxhero <aiopsclub@163.com>
2025-02-05 13:50:16 -05:00
S Code Man 8afffa5c98
Chartify v0.20.8 update (#1908)
* fix: use chartify v0.20.8 with relevant fix for import-values

Signed-off-by: GitHub <noreply@github.com>

* chore: add test

Signed-off-by: GitHub <noreply@github.com>

---------

Signed-off-by: GitHub <noreply@github.com>
2025-02-05 21:42:05 +08:00
Guillaume Le Blanc 09c9ceb075
Use a regex to match --state-values-set-string arguments (#1902)
Signed-off-by: Guillaume Le Blanc <gleblanc@proton.me>
2025-02-04 07:59:31 +08:00
Matthias Baur d059b28fb3
Ensure 'helm repo add' is also not pollute on helmfile template (#1887)
When having multiple helmfiles in one helmfile.d folder and multiple of
them having repositories defined, the errors mention in #1749 still
existed.

Fixes #1749 (again)

Signed-off-by: Matthias Baur <m.baur@syseleven.de>
2025-01-22 20:42:33 +08:00
Thomas Loubiou 8891439cdc
fix: inject global values in Chartify (#1805)
* fix: inject global values in Chartify

Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>

* test: add integration tests for template --values

Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>

---------

Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>
2024-12-04 18:51:21 +08:00
Matthias Baur d23dc8a9de
Add integration tests for #1749 (#1766)
* Add integration tests for #1749

Signed-off-by: Matthias Baur <m.baur@syseleven.de>

* Reset extra args on a higher level to only affect subsequent helmfiles

With the implementation before, extra args has been reset after each
helm.exec which leads to problems with multiple charts in a helmfile
since the correct args are only set once in Template(). But Template()
calls helm.exec(template) multiple times.

Signed-off-by: Matthias Baur <m.baur@syseleven.de>

---------

Signed-off-by: Matthias Baur <m.baur@syseleven.de>
2024-11-06 08:12:20 +08:00
yxxhero 18529ab7c5
fix: two releases using the same chart in different version fails (#1685)
* fix: two releases using the same chart in different version fails

Signed-off-by: yxxhero <aiopsclub@163.com>
2024-09-12 20:26:45 +08:00
yxxhero 224e0f6c6a
feat: bump chartify versions (#1693)
* feat: bump chartify versions

Signed-off-by: yxxhero <aiopsclub@163.com>
2024-09-07 12:39:42 +08:00
yxxhero 56dad58180
feat: add namespace info in syncRelease and diffRelease (#1609) 2024-07-16 09:47:00 +08:00
Tim Ramlot 824e5a8b92
Use logger for helm output (#1585)
* use logger for helm output

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>

* update integration test output

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>

* make logging output configurable

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>

* also compare stderr in integration tests

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>

---------

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-07-04 13:53:31 +09:00
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 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 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
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
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
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 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 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
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
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
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
yxxhero d8d0bf830a
Add helmfile state validate policy (#592) 2022-12-21 10:49:31 +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
yxxhero 211852cd38
use dyff as yamldiff tool (#542)
Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
2022-11-27 09:47:09 +09:00
yxxhero 5c5dc42ef5
Refactor integration tests (#531)
* refactor integrations

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

* Update the integration test directory structure to better correlate the test script with testdata

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

* Undo the test-cases directory renaming to make the diff more easy to understand

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

* fix ci

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

Signed-off-by: yxxhero <aiopsclub@163.com>
Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-11-23 14:44:16 +09:00
xiaomudk 7844145ee3
Allow helmfile statefile to passed by stdin (#520)
* Allow helmfile statefile to passed by stdin

Signed-off-by: xiaomudk <xiaomudk@gmail.com>
2022-11-22 11:34:05 +08:00
yxxhero 143f85b4f1 fix: helmfile template fails when selector matches a chart fetched with go-getter
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-11-13 15:10:57 +08:00
yxxhero 82004b53f9
split run.sh to make run.sh be more clear. (#485)
split run.sh

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

Signed-off-by: yxxhero <aiopsclub@163.com>
2022-11-04 10:51:57 +09:00
yxxhero bc255f3e51 fix: fix need logic in chart stage
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-10-24 09:51:04 +08:00