Add a --skip-charts flag to the `helmfile build` command to allow users
to skip chart preparation, following the same pattern as the list and
destroy commands.
This addresses an issue where `helmfile build` would run `helm template`
on kustomize resources during chart preparation, even though build is
meant to be a read-only inspection command.
Changes:
- Add SkipCharts field to BuildOptions
- Add --skip-charts flag to build command CLI
- Update StateConfigProvider interface to include SkipCharts()
- Update PrintState() to conditionally skip withPreparedCharts when flag is set
By default, the flag is false (charts are prepared) to maintain backward
compatibility. Users can now run `helmfile build --skip-charts` to get
fast output without chart preparation.
Signed-off-by: Shane Starcher <shanestarcher@gmail.com>
* Fix helmBinary and kustomizeBinary being ignored when using bases
- Add mergo.WithOverride to merge operations for proper precedence
- Move default binary setting after base loading
- Add comprehensive tests for various base scenarios
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* Fix code formatting in create_test.go
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* Remove duplicate comment block in create_test.go
Removed duplicate comment lines (530-532) as identified by code review.
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
The build command is intended to be a read-only inspection command that
outputs the helmfile state. However, when releases use jsonPatches,
strategicMergePatches, or transformers, the chart preparation step
triggers chartify, which runs helm template and requires dependencies to
be built.
This causes two issues:
1. helm template is executed unnecessarily for a simple state inspection
2. Missing chart dependencies cause errors even with SkipDeps enabled
This change modifies PrepareCharts to filter out releases that require
chartify when the command is "build". These releases are excluded from
chart preparation, preventing helm template from being invoked.
The state output will still include these releases, but their charts
won't be processed during the build operation.
Signed-off-by: Shane Starcher <shanestarcher@gmail.com>
* Initial plan
* Add enableDNS flag support to diff command
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* Extract EnableDNS flag logic into reusable function
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* Initial plan
* Implement --timeout flag for helmfile sync command
- Add Timeout field to SyncOptions struct in pkg/config/sync.go
- Add --timeout flag to sync command in cmd/sync.go
- Add Timeout field to SyncOpts struct in pkg/state/state.go
- Modify timeoutFlags() function to prioritize CLI timeout over release and default configs
- Add test case to verify CLI timeout overrides other timeout settings
- Follow same pattern as existing --wait and --wait-for-jobs flags
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* Fix lint issues: format test struct fields properly
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* Update docs: Add --timeout flag documentation for helmfile sync command
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* Initial plan
* Fix panic in helmfile init when parsing invalid helm versions
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* Fix parseHelmVersion to handle versions without v prefix
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* Simplify parseHelmVersion function to be more readable
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
- Bump HelmDiffRecommendedVersion from v3.12.3 to v3.12.5 in pkg/app/init.go
- Bump default HELM_DIFF_VERSION from 3.12.3 to 3.12.5 in test/integration/run.sh
- Update HelmRecommendedVersion from v3.18.4 to v3.18.5 in pkg/app/init.go
Signed-off-by: yxxhero <aiopsclub@163.com>
* Allow caching of remote files to be disabled
Make it possible to automatically update the cache of remote
resources by disabling the caching of those resources using a query
string parameter (`cache=false`).
Signed-off-by: Jess <jess@ros.io>
* Fix test that broke
Because query parameters are being re-encoded, = is being encoded to %3D.
Signed-off-by: Jess <jess@ros.io>
* Add test for disabling caching of remote resources
Signed-off-by: Jess <jess@ros.io>
* Include example usage in docs
Signed-off-by: Jess <jess@ros.io>
---------
Signed-off-by: Jess <jess@ros.io>
* Feat: reuseValues in release
Adding properties to set reuseValues flag on release-level.
Signed-off-by: Adam Blasko <adam.blasko1@gmail.com>
* feat: fixing tests
Most of the tests had issues with flag order, which changed due to moving the value control flags out of the "common flags" for diff
Signed-off-by: Adam Blasko <adam.blasko1@gmail.com>
* fix: fixing lint issue
Signed-off-by: Adam Blasko <adam.blasko1@gmail.com>
---------
Signed-off-by: Adam Blasko <adam.blasko1@gmail.com>
* fix: Check needs with context and namespace
Signed-off-by: André Arnqvist <andrearnqvist@gmail.com>
* fix: Ensure releases have overrides
Signed-off-by: André Arnqvist <andrearnqvist@gmail.com>
* fix: Run go fmt
Signed-off-by: André Arnqvist <andrearnqvist@gmail.com>
* fix: Add tests checking needs with same name in different namespaces
Signed-off-by: André Arnqvist <andrearnqvist@gmail.com>
* fix: Simplify setting overrides
Signed-off-by: André Arnqvist <andrearnqvist@gmail.com>
---------
Signed-off-by: André Arnqvist <andrearnqvist@gmail.com>