helmfile/pkg
Indrek Juhkam a409b450cd
Add `--skip-refresh` flag to the build command (#444)
This improves the `helmfile sync` performance.

From the code: `BuildDeps` is used only by `runHelmDepBuilds`, which
only is used by `PrepareCharts` which is finally only used by
`withPreparedCharts`.

`withPreparedCharts` already does `SyncReposOnce` which means we do not
have to refresh the local repository cache on each chart build.

This is only supported in Helm v3.

This seems to be mostly affecting helmfiles which have a lot of releases
and those release charts use sub dependencies.

I saw significant performance improvements for a helmfile with 45
releases, 2 repositories, and most of the charts also had their own
dependencies. Results:

Before the patch:
* real  9m10.565s
* real  9m38.335s
* real  9m14.941s
* real  5m13.106s (with cache)

After the patch:
* real  6m51.965s
* real  6m36.605s
* real  6m31.685s
* real  3m0.271s (with cache)

These were tested with:
```
rm -rf ~/.cache/helmfile ~/.cache/helm ~/.config/helm/repositories.* && helmfile sync ...
```

The result with `(with cache)` was without deleting the caches first.

From these metrics it seems that the sync duration decreased 20-45%
depending on the run, release count, dependencies and if the cache was
used or not.

As far as I understand, this should be backward-compatible change.

Signed-off-by: Indrek Juhkam <indrek@urgas.eu>

Signed-off-by: Indrek Juhkam <indrek@urgas.eu>
2022-10-20 09:03:08 +09:00
..
app fix: issue path in test on windows 2022-10-19 08:46:43 +08:00
argparser fix lint error 2022-08-13 07:40:32 +08:00
config fix: fix deps args 2022-10-18 22:01:05 +08:00
environment bump: upgrade gopkg.in/yaml.v2 to gopkg.in/yaml.v3 2022-10-03 05:24:51 +08:00
envvar move HELMFILE_UPGRADE_NOTICE_DISABLED into envvar file 2022-10-15 14:22:51 +08:00
errors fix incorrent exit code 2022-09-13 08:23:55 +08:00
event Fixes for updates from rebase 2022-09-19 08:55:44 +09:00
exectest Use helm show chart to identify chart version 2022-10-03 22:04:08 -03:00
filesystem Introduce Helmfile's own filesystem abstraction to correctly unit test some components (#307) 2022-08-24 12:58:43 +09:00
helmexec Add `--skip-refresh` flag to the build command (#444) 2022-10-20 09:03:08 +09:00
maputil bump: upgrade gopkg.in/yaml.v2 to gopkg.in/yaml.v3 2022-10-03 05:24:51 +08:00
plugins add Go lint 2022-07-16 20:21:11 +08:00
remote Prevent excessive log in tests 2022-10-11 06:19:32 +09:00
state fix helmfile diff error in window platform 2022-10-19 17:50:56 +08:00
testhelper Prevent excessive log in tests 2022-10-11 06:19:32 +09:00
testutil add Go lint 2022-07-16 20:21:11 +08:00
tmpl bump: upgrade gopkg.in/yaml.v2 to gopkg.in/yaml.v3 2022-10-03 05:24:51 +08:00