Commit Graph

220 Commits

Author SHA1 Message Date
yxxhero abbdb6950b
feat: add gotmpl file ext when using helmfile.d feature (#649)
Closes #654

Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2023-01-25 08:34:39 +09:00
Yusuke Kuoka 652b609b35
Do not load the legacy default charts.yaml in v1 (#651) 2023-01-24 07:01:31 +08: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
koralsky fc634c9ee3
feat: Reset values flag (#602)
Ref https://github.com/helmfile/helmfile/discussions/593

* implemented --reset-values flag overriding .helmDefaults.reuseValues=true
* tests for --reset-values flag
* fixed pkg/app tests
* added tests for both reset & reuse flags given
* added appendValuesControlMode method for --reuse/reset-values flag processing
* updated code comments & docs

Signed-off-by: Karol Ossowski <k@koralsky.pl>
2023-01-17 09:34:37 +09:00
xiaomudk c4eb62388b
Drop Helm v2 support (#613)
Resolves #589

Signed-off-by: xiaomudk <xiaomudk@gmail.com>
2023-01-17 09:24:47 +09:00
yxxhero 8d96bbb0e4
feat: mark deprecated args and cmd for v1 (#628)
* feat: mark deprecated args and cmd for v1

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-01-14 23:43:05 +08:00
guofutan 0a953731b0 fix(#507): support assign --post-renderer within helmfile flags and helmdefault or release config
1. only implement post-renderer flags this patch
2. As mumoshu advise, add helmfile flags `--post-render` and add the
   postRenderer  config in helmDefaults and release. the priority is
   helmfile flags > release > helmDefaults.
3. fix the test case in state_test.go and some other tests.

Signed-off-by: guofutan <guofutan@tencent.com>
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-12-13 13:12:07 +08:00
xiaomudk 94381c1e17
Fix preapply hooks are not called on no diff when run apply subcommand (#522)
* Fix presync hooks are not called on no diff when run apply subcommand

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

* Update docs/index.md

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

Signed-off-by: xiaomudk <xiaomudk@gmail.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-12-10 12:07:26 +09: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
Helge Eichelberg 8f59a1c18a
Add --output-dir-template flag to the fetch command (#456)
* Add --output-dir-template flag to the fetch command

Signed-off-by: elchenberg <elchenberg@users.noreply.github.com>
2022-11-05 18:55:02 +08:00
xiaomudk 6dcde20d7a
Add subcommand init for checks and installs helmfile deps (#389)
* Add subcommand init for checks and installs helmfile deps

Signed-off-by: xiaomudk <xiaomudk@gmail.com>
2022-11-03 14:51:30 +08:00
Quan TRAN 414f899c28
use fs.Getwd() to get working dir for sub helmfile (#471)
* use fs.Getwd() to get working dir for sub helmfile

Signed-off-by: Quan TRAN <itscaro@users.noreply.github.com>
2022-10-29 07:40:40 +08:00
Quan TRAN 2702161e74
add basepath along with filepath into yaml comment (#460)
* add basepath along with filepath into yaml comment

Signed-off-by: Quan TRAN <itscaro@users.noreply.github.com>
2022-10-25 17:44:28 +08: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
Yusuke Kuoka 111a248523 fixup! Fix preapply hook behavior
Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-10-11 08:20:51 +08:00
Yusuke Kuoka c2ea0f0355 Fix preapply hook behavior
Fixes #399

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-10-11 08:20:51 +08:00
yxxhero 6a36f34c7d
fix: child process not exit when recive term signal (#418)
* fix: child process not exit when recive term signal

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

* fix: wait for clean done

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-10-09 17:51:52 +09:00
yxxhero 21c28ca6d0
feat: add reuse-values args for diff apply and sync (#411)
Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
2022-10-08 14:27:39 +09:00
yxxhero 06cfdfc891 fix SetRetainValuesFiles issue
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-09-24 12:10:42 +08:00
Yusuke Kuoka 6aeb6b38ba Fix not to ignore diff selector when it matched nothing
Fixes #327

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-09-19 04:46:52 +00:00
Yusuke Kuoka 793050cc18 Defer implementing preapply hook start logs to another commit/pr
Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-09-19 00:44:31 +00:00
Yusuke Kuoka 9e673ca902 Write preapply notice to debug log instead of info
Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-09-19 00:27:33 +00:00
Yusuke Kuoka 5b1606df75 fixup! Updates based on review comments
Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-09-19 08:55:44 +09:00
Anton Bretting 3c0456c577 Updates based on review comments
Signed-off-by: Anton Bretting <sajfer@gmail.com>
2022-09-19 08:55:44 +09:00
Anton Bretting f0b76e9e26 Fixes for updates from rebase
Signed-off-by: Anton Bretting <sajfer@gmail.com>
2022-09-19 08:55:44 +09:00
Anton Bretting ea56061609 Move preapply code to separate function
Signed-off-by: Anton Bretting <sajfer@gmail.com>
2022-09-19 08:55:44 +09:00
Anton Bretting ca7942c751 Uncomment code that was accidentally commented out
Signed-off-by: Anton Bretting <sajfer@gmail.com>
2022-09-19 08:55:44 +09:00
Anton Bretting eb2419aa15 Remove unnecessary if statement
Signed-off-by: Anton Bretting <sajfer@gmail.com>
2022-09-19 08:55:44 +09:00
Anton Bretting db81f18095 Only run preapply or presync
Signed-off-by: Anton Bretting <sajfer@gmail.com>
2022-09-19 08:55:44 +09:00
Anton Bretting 1a3c11dffd Add unittests for preapply
Signed-off-by: Anton Bretting <sajfer@gmail.com>
2022-09-19 08:55:44 +09:00
Anton Bretting 4e5987d833 Add preapply hook
Signed-off-by: Anton Bretting <sajfer@gmail.com>
2022-09-19 08:55:44 +09:00
Rodrigo Fior Kuntzer 8408b021f0
feat: show live output from the Helm binary (#286)
* feat: show live output from the Helm binary

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>

* fixup! Merge branch 'main' into enable-live-output

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-09-18 14:24:35 +09:00
Viktor Oreshkin af52c960f4 chore: list: withPreparedCharts -> skipCharts
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
2022-09-06 09:54:51 +03:00
Viktor Oreshkin ebf0f370a1 fix: add missing concurrency option to List
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
2022-09-06 09:43:56 +03:00
Viktor Oreshkin f3788249e4 feat: add flag to list to skip prepare
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
2022-09-05 18:12:17 +03:00
Viktor Oreshkin 8b0ad72e77 feat: dont prepare on list
This changes list command so it doesn't run withPreparedCharts,
and just lists releases instead

Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
2022-09-05 13:37:00 +03:00
Viktor Oreshkin 822b7b2a9b feat: honor concurrency in withPreparedCharts
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
2022-09-01 02:08:54 +03:00
yxxhero 9284d1764e
Add --interactive option to sync, delete and destroy / Remove --interactive from global options (#328)
* add interactive in sync & remove --interactive in global options

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

* fix unittest

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

* same behave as apply when in interactive

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

Signed-off-by: yxxhero <aiopsclub@163.com>
2022-08-28 10:36:07 +09:00
Arkaitz Jimenez cc33e7b7d8
Introduce Helmfile's own filesystem abstraction to correctly unit test some components (#307)
Use abstracted FS

Signed-off-by: Arkaitz Jimenez <arkaitzj@gmail.com>

Signed-off-by: Arkaitz Jimenez <arkaitzj@gmail.com>
2022-08-24 12:58:43 +09:00
Yusuke Kuoka 89950f3794
Merge branch 'main' into update_golang_lint 2022-08-14 12:21:10 +09:00
David Ackroyd cf94a4edb3
Fix Inclusion of Releases for Other Environments (#276)
Fixing releases being included which do not match the environment
 requested, which is a regression introduced by #234. The issue remains
 when Helmfile state values are supplied, which is not a regression and
 will be addressed separately.

Partial resolution for #271

Signed-off-by: David Ackroyd <dackroyd@fairfaxmedia.com.au>

Signed-off-by: David Ackroyd <dackroyd@fairfaxmedia.com.au>
2022-08-14 10:47:47 +09:00
yxxhero 8690d63401 fix lint error
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-08-13 07:40:32 +08:00
yxxhero 85ade797ab
Use cobra (#234)
switch to cobra

Signed-off-by: yxxhero <aiopsclub@163.com>
2022-07-19 21:06:18 +09:00
yxxhero ac23def893 add Go lint
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-07-16 20:21:11 +08:00
yxxhero 9b0293d9ea
fix within func issue (#209)
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-07-05 17:50:43 +09:00
Yusuke Kuoka fc306ec3d1
Make a few helmfile sub-commands consistently support needs-related flags (#78)
* Make a few helmfile sub-commands to consistently support needs-related flags

* helmfile-diff adds support for --include-transitive-needs
* helmfile-template adds support for --skip-needs
* helmfile-lint adds support for --skip-needs, --include-needs, and --include-transitive-needs

Ref https://github.com/roboll/helmfile/issues/2055

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

* Fix a few helmfile-lint needs related bugs and add tests

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

* Is include-transitive-needs realy working as intended? 🤔

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

* Confirm that it does fail on unselected need by default

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

* Add missing testdata

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

* Test helmfile-template for include/skip needs support

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

* Fix a few terms

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

* Add more tests to better know the current helmfile-diff behavior around needs

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

* Fix failing tests

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

* Fix helmfile-diff to consistently handle skip/include-needs

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

* Extract testhelper.RequireLog for reusing

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

* Fix all bugs and test cases for TestDiff and TestDiff_2

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

* Fix TestDiff_2

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

* Fix TestDiff

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

* Fix TestDiffWithNeeds

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

* Unify behavior on including disabled releases as needs for lint and template

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

* Fix bug that --include-transitive-needs does not imply include-needs

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-06-20 07:19:39 +09:00
Quan TRAN 577f54af7a
Introduce DISABLE_INSECURE_FEATURES to disable insecure command executions (#1)
* introduce DISABLE_INSECURE_FEATURES to disable insecure executions

Signed-off-by: Quan TRAN <account@itscaro.me>

* disable remote sources when DISABLE_INSECURE_FEATURES is set to "true"

Signed-off-by: Quan TRAN <account@itscaro.me>

* refactor envvar package

Signed-off-by: Quan TRAN <account@itscaro.me>

* (test) fix test fixtures

Signed-off-by: Quan TRAN <account@itscaro.me>

* use absolute path to avoid unit test failure

Signed-off-by: Quan TRAN <account@itscaro.me>

* Fix conflicts

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-06-05 15:15:06 +09:00
yxxhero aaf2126f91 little code optimize
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-06-05 12:58:55 +08:00
Quan TRAN a92c574a98
Merge pull request #112 from yxxhero/remove_unused_comments
remove unused comments
2022-05-30 23:12:19 +02:00
Quan TRAN 0cfef76f0d
Merge pull request #88 from chubchubsancho/validate_manifest_on_sync
feat: allow --validate on sync command
2022-05-30 10:11:53 +02:00
yxxhero 0c57129aab remove unused comments
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-05-30 10:08:19 +02:00
austin ce eb3484d4a8
Rename module to github.com/helmfile/helmfile
Also updates a few more references to the roboll/helmfile repository,
where possible.

Signed-off-by: austin ce <austin.cawley@gmail.com>
2022-05-18 10:05:07 -04:00
Grégory SANCHEZ 62747378ca feat: allow --validate on sync command
This will permit usage of `--validate` options with sync command

Signed-off-by: Grégory SANCHEZ <gregory.sanchez@icloud.com>
2022-05-17 14:00:55 +02:00
Yusuke Kuoka 97e0ca73ca feat: Auto-detect term for coloring helm-diff output
Since helm-diff has added an ability to auto-detect the term to decide if it should output with color or not, helmfile had been defaulted to no-color.
This resoloves that, by adding a term-detection logic that is same as helm-diff.

As a part of this work, I have also implemented a new global flag `--color`, which is used for forcing color without relying on the term-detection logic implemented in helmfile or explicitly setting the HELM_DIFF_COLOR envvar. I hope it is useful for folks.

Ref https://github.com/roboll/helmfile/issues/2043

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-04-06 02:38:36 +00:00
yxxhero 303ef9cd80 remove ioutil usage in all project
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-04-03 15:53:19 +08:00
Anton Bretting b1928e585d
Stop panic when deduplicating releases (#2067)
* Stop panic when deduplicating releases
* Add testdata for new testcases
2022-03-10 18:57:58 +09:00
Anton Bretting 2f04831817
Fix various golangci-lint errors (#2059) 2022-02-12 20:28:08 +09:00
Quan TRAN baafe702b2 use user cache directory for remote helmfiles
Signed-off-by: Quan TRAN <account@itscaro.me>
2022-02-12 17:52:52 +09:00
Quan TRAN 242e601898 add subcommands `cache info` `cache cleanup`
Signed-off-by: Quan TRAN <account@itscaro.me>
2022-02-12 17:52:52 +09:00
drivelikebrazil debd3c0eea
Add `--skip-tests` to helmfile template command (#2057)
* Add skip-tests to helmfile template command

* Fix formatting
2022-01-22 15:26:17 +09:00
Quan TRAN c069fbf268
add cleanup to write-values & lint to harmonise this flag (#2021) 2022-01-10 17:32:02 +09:00
Christoph Petrausch 346e318fd0
Correct enabled property in helmfile list (#1921)
Use the value of the `condition` field instead of the `installed` field of a release in the `enabled` column of helmfile list.
The value of the `installed` field is shown in a new `installed` column.

Fixes #1920

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-01-10 17:24:07 +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
pjotre86 9354c38a0a
Process feedback for pr 1983 (#1992)
* Guard collectNeeds-method against infinite recursion.

* Also check for namespace and kubecontext when collecting needs.

Co-authored-by: Peter Aichinger <petera@topdesk.com>
2021-10-22 08:29:33 +09:00
pjotre86 77e6268bcb
Add support for transitive dependencies. (#1983)
Co-authored-by: Peter Aichinger <petera@topdesk.com>
2021-10-20 17:55:08 +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 97bab23e0c
Fix --skip-cleanup to work with chartify (#1860) 2021-05-24 08:30:58 +09:00
dudicoco 92ba347d6f
Add --skip-diff-on-install to helmfile diff (#1841)
* Add --skip-diff-on-install to helmfile diff
2021-05-16 14:02:53 +09:00
Yusuke Kuoka 212e6acf23
Fix helmfile-lint not to stop on fisrt error (#1836)
Fixes #1826
2021-05-09 13:33:36 +09:00
Yusuke Kuoka 794ab9fc66
Fix lint and status not to fail with selector and needs (#1834)
Fixes #1830
2021-05-08 21:23:09 +09:00
Yusuke Kuoka 08db073958
Fix broken selector and DAG calculation logic after --{include,skip}-needs addition with correct Release IDs (#1823)
#1772 broke `--selector` with `needs` in many ways.

The two biggest problems I've encountered were:

- duplicate releases even if you've provided a proper `selector` to deduplicate
- sync/deletion ordering broken when you have `needs`

For the first issue, we had to update `getSelectedReleases` function to also calculate the "selected releases and releases needed by the selected releases", and use that to calculate the DAG. That should have been done in #1772.

The latter started happening after I've fixed the first issue. The source of the issue was that `needs` turned out to be ambiguous in a few cases.

Previously, `needs: ["foo/bar"]` had two meanings. One for "needs release bar in kubecontext foo", another for "needs release bar in namespace foo".

Moreover, `needs: ["foo/bar/baz"]` had three meanings.

- `needs release baz in tiller namespace foo and namespace baz`
- `needs release baz in namespace bar in kubecontext foo`
- `needs release baz in tiller namespace bar in kubecontext foo`.

Especially, the first meaning doesn't make sense at all. Helm 2 solely use tillerNamespace for namespacing the release and Helm 3 uses namespace for that.

This fix sorts all the bugs and issues I've found so far around that, by changing the meanings of the above two examples as follows:

- `foo/bar` means `namespace=foo,name=bar` for Helm 3 and `tillerNamespace=foo,name=bar` for Helm 2
  - `needs release bar in kubecontext foo` is now `foo//bar`. Notice the extra `/` between `foo` and `bar`.
- `foo/bar/baz` means `kubecontext=foo,namespace=bar,name=baz` for Helm 3 and `kubecontext=foo,tillerNamespace=bar,name=baz` in Helm 2

Fixes #1818
2021-05-01 21:59:25 +09:00
Yusuke Kuoka de8644a504
Fix --selector results to correctly deduplicate releases (#1822)
Fixes #1818
2021-05-01 15:06:07 +09:00
katsew f28ad5af23
Fix defaulting and overriding kubeContext (#1814)
Ref #1810

* fix defaulting and overriding kubeContext

* make defaulting kubeContext side-effect free

* checkDuplicates should check releases with overriden values
2021-05-01 12:42:29 +09:00
Yusuke Kuoka 5a3bd7d649
Fix destory, delete, and test to work with chartify on local chart with dependencies that are not yet downloaded (#1801)
Fixes #1800
2021-04-24 20:50:16 +09:00
astorath 83189dbad3
Enable `helmfile-diff` to pass the output format to helm-diff (#1784)
* tests: fix vagrant test run

* feat: added an option to specify the different diff output format

* renamed diff-output to output

* renamed diff-output to output

Co-authored-by: Andrey Tuzhilin <andrey@zelf.co>
2021-04-24 08:07:24 +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 ae942c5288
Fix --skip-crds not working with chartify (#1774)
Follow-up for #1771
Ref #1770
Ref https://github.com/roboll/helmfile/pull/1771#issuecomment-817399338
2021-04-13 09:09:58 +09:00
Yusuke Kuoka a111e89b27
Add `--skip-crds` to `helmfile sync` and `helmfile apply` (#1771)
Resolves #1770
2021-04-11 10:38:23 +09:00
Yusuke Kuoka 1d7608f42c Fix `helmfile repos` to not fail with `forceNamespace`
Fixes #1752
2021-04-10 16:26:40 +09:00
Yusuke Kuoka 2ff06a8abd
Fix chartify to take --include-crds into account (#1761)
Fixes #1760
2021-04-08 10:06:34 +09:00
Quan TRAN c65bdff62c
Respect release filter in lint and status (#1672)
Ref #1190
Fixes #1651

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2021-04-06 15:47:29 +09:00
Yujun Zhang a161796dc4
feat: Allow overriding chart via flag (#1751)
Adds `--chart` flag for overriding the selected release's chart ad-hoc-ly like `helmfile --chart $CHART template`.
This is handy when e.g. you want to have an ArgoCD application per each release in your helmfile.yaml, while also providing the ability to customize the release's chart without touching helmfile.yaml.

See https://github.com/roboll/helmfile/issues/1690#issuecomment-812321354 for more context.

Closes #1690
2021-04-06 13:20:41 +09:00
Quan TRAN 53c6d2f988
Add helmfile-fetch command to downloading and generating charts (#1734) 2021-03-30 16:26:31 +09:00
Jason Witkowski 2618cfb38b
Enable --wait-for-jobs flag introduced in helm 3.5 (#1715)
Fixes #1650
Fixes #785

This change introduces:

- `--wait-for-jobs` CLI override option to helmfile binary
- `waitForJobs` helmDefaults parameter (default `false`)
- `waitForJobs` release parameter (default `false`)

Note that `--wait-for-jobs` was introduced in Helm 3.5 (https://github.com/helm/helm/pull/8363)
2021-03-23 16:53:57 +09:00
Quan TRAN 5ce755e4d8
Add chart & version to list cmd output (#1731) 2021-03-23 16:29:48 +09:00
Quan TRAN b7d6639b25
(fix) remove usage of charts.yaml in error message (#1732) 2021-03-23 16:27:51 +09:00
Jason Witkowski bd3838c059
Add ability to specify and override helmDefaults.wait via cli (#1678) 2021-02-24 12:47:27 +09:00
Yusuke Kuoka 1ef9b29f6d
Improve handling of releases being newly installed by helmfile-apply (#1618)
This improves helmfile-apply with two things:

- Some users had timing-out issues or annoyed by huge output from helm-diff run as part of helmfile-apply on first install. `--skip-diff-on-install` skips running helm-diff for releases being newly installed, so that you can avoid those issues.
- Some users had difficultly or found it not straight-forward to install CRDs and custom resources from separate charts in one helmfile-apply (#1353). The new helmfile.yaml release field `disableValidationOnInstall: true` adds `--disable-validation` to helm-diff only for releases being newly released, which should mostly resolve the issue.

Resolves #1353
2020-12-11 09:09:35 +09:00
Wi1dcard 4e485219d7
Fix the logic of helmfile deps and add tests. (#1588) 2020-11-19 09:29:59 +09:00
Yusuke Kuoka 88884b68dc
feat: `helmfile template --skip-cleanup` (#1570)
* feat: `helmfile template --skip-cleanup`

Resolves #1517
2020-11-06 09:23:49 +09:00
Yusuke Kuoka 5a15b65b94
feat: Add `helmfile apply --skip-cleanup` (#1571)
This deprecates the old `--retain-values` which was not working as intended.

Also see #1570 - there's now `--skip-cleanup` for `helmfile-template`, too.
2020-11-05 10:18:30 +09:00
Yusuke Kuoka 6b86408500
feat: Add `helmfile template --include-crds` (#1568)
This allows you to use helmfile-template output as a GitOps source, when the template output contains CRDs and you use Helm 3.

Helm 3 by default removes CRDs from the template output. If you want to git-commit helmfile-template containing CRDs for GitOps and you use Helm 3 for templating, the only way is provide this newly added `--include-crds` flag.
2020-11-05 10:13:25 +09:00
Yusuke Kuoka 87e86dcfd2
Fix `helmfile --selector x=y template` with `needs` (#1564)
I had mistakenly inverted the necessary flag to turn off the legacy processing on selectors that should be used only for helmfile commands that does not support DAGs/needs.

Fixes #1552
2020-11-04 09:29:23 +09:00
Yusuke Kuoka c170b5a621
Minor tweaks for `helmfile write-values` (#1533)
See 1 and 3 in https://github.com/roboll/helmfile/issues/1460#issuecomment-691863465
2020-10-13 09:33:49 +09:00
Yusuke Kuoka 3018e82902
Fix multiple --set in --args messed up in `helmfile template` (#1529)
Fixes #1520
2020-10-13 08:38:06 +09:00
Yusuke Kuoka b176408eb2
Enable `helmfile test` testing only enabled and selected releases (#1486)
Resolves #1483
2020-09-21 09:44:05 +09:00
Yusuke Kuoka 0fad9f0544
Add experimental write-values command for writing values files only (#1469)
Ref #1460
2020-09-11 22:19:36 +09:00
Yusuke Kuoka 3e6542e341
Fix test flake for `commonLabels` (#1449)
Ref https://github.com/roboll/helmfile/pull/1415#issuecomment-684139831
2020-09-01 10:52:08 +09:00
Yusuke Kuoka cd0ecc5263 Fix build error after `helmfile build --embed-values` addition
This is a follow-up for #1436
2020-08-29 15:01:22 +09:00
Yusuke Kuoka 0fc0869671
feat: `helmfile build --embed-values` to embed release values and secrets into the output (#1436) 2020-08-29 13:18:17 +09:00