* feat: Add updateStrategy option in the state file with 'reinstall'/'reinstallIfForbidden' choices to uninstall and apply the specific release(s) (if forbidden to update)
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Fix unit tests related to the new updateStrategy feature
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Fix unit tests related to the new updateStrategy feature
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Resolve linter issue due to cognitive complexity
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Updated index.md to describe the possible values of updateStrategy
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Add validation of updateStrategy parameter and unit test
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Updated unit test
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Removed 'reinstall' update strategy option to only have reinstallIfForbidden, cleanup of pre-sync changes, adapted unit tests
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Display affected releases that were reinstalled
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Make sure to add --wait when deleting a release to be reinstalled due to reinstallIfForbidden
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
* Apply suggestions from Copilot code review
Signed-off-by: Simon Bouchard <sbouchard@rbbn.com>
---------
Signed-off-by: Simon Bouchard <sbouchard@rbbn.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>
* cleanup disk in release ci
Signed-off-by: yxxhero <aiopsclub@163.com>
* cleanup disk in release ci
Signed-off-by: yxxhero <aiopsclub@163.com>
* cleanup disk in release ci
Signed-off-by: yxxhero <aiopsclub@163.com>
* cleanup disk in release ci
Signed-off-by: yxxhero <aiopsclub@163.com>
---------
Signed-off-by: yxxhero <aiopsclub@163.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>
* docs: update status section with May 2025 release information
Signed-off-by: yxxhero <aiopsclub@163.com>
* docs: Update Helmfile v1 proposal link in index.md
Signed-off-by: yxxhero <aiopsclub@163.com>
---------
Signed-off-by: yxxhero <aiopsclub@163.com>
* 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>
When the evaluated release has installed: false it's perfectly fine that
a needed release is installed: false as well.
fixes#1464
Signed-off-by: jayme-github <jayme-github@users.noreply.github.com>
* build: update golang version to 1.24 and golangci-lint to v1.64.5
Signed-off-by: yxxhero <aiopsclub@163.com>
* build: update golang version to 1.24 in Dockerfiles
Signed-off-by: yxxhero <aiopsclub@163.com>
* fix more issues
Signed-off-by: yxxhero <aiopsclub@163.com>
---------
Signed-off-by: yxxhero <aiopsclub@163.com>
* docs: add skipSchemaValidation to index.md and update related structs
Signed-off-by: yxxhero <aiopsclub@163.com>
* feat: add SkipSchemaValidation to config and state handling
Signed-off-by: yxxhero <aiopsclub@163.com>
---------
Signed-off-by: yxxhero <aiopsclub@163.com>
* 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>
This commit is supposed to add template support to post renderer args.
Also, to make it possible to template arguments that are added to helm
defaults, during the load, I'm removing default post renderer args from
the state and putting them to each release, unless custom args are
defined for the release.
Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
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>
* 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>
update example chart URL
Signed-off-by: David Neeley <david.neeley@motorolasolutions.com>
Co-authored-by: David Neeley <david.neeley@motorolasolutions.com>
* feat: add HELMFILE_INTERACTIVE env var to enable interactive mode
This commit adds the `HELMFILE_INTERACTIVE` environment variable
to enable the interactive mode by default.
Anything other than `true` will disable the interactive mode.
The precedence has the `--interactive` flag.
Signed-off-by: Krzysztof Łuczak <krzysztof.luczak.pro@gmail.com>
* Trim trailing whitespaces
Signed-off-by: Krzysztof Łuczak <krzysztof.luczak.pro@gmail.com>
---------
Signed-off-by: Krzysztof Łuczak <krzysztof.luczak.pro@gmail.com>
* 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>
--skip-refresh right now disables adding new repos, but in addition it
should pass down to helm deps update to not refresh the actual values
Signed-off-by: Shane Starcher <shane.starcher@gmail.com>
Co-authored-by: Shane Starcher <shane.starcher@gmail.com>
* chore: Update Ubuntu image to LTS version 24.04 (#1696)
Signed-off-by: Patrick Hobusch <patrick@hobusch.net>
Signed-off-by: Vedran Kolka <vedran.kolka@syntio.net>
* Fixed typo in configuration section
The comment for setting the password for a Helm repository said it was the "username". Changed it to "password"
Signed-off-by: Vedran Kolka <vedran.kolka@syntio.net>
---------
Signed-off-by: Patrick Hobusch <patrick@hobusch.net>
Signed-off-by: Vedran Kolka <vedran.kolka@syntio.net>
Co-authored-by: Patrick Hobusch <pathob@users.noreply.github.com>
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
* eat: adding ability for for charts to be pulled without HTTPS
accomplished by:
- Adding PlainHttp attribute to RepositorySpec., HelmDefault, ReleaseSpec
- Adding UnitTests for getOCIChart Flags.
- Adding funciton and unitTests for getChartDownload
- Changing and refactoring how Flags are added to getOCIChart.
Resolves#1224
Signed-off-by: Peter Halliday <peter.halliday@servicenow.com>
* Pass PlainHttp to OCI repo options, fix unit test
Signed-off-by: Pascal Rivard <privard@rbbn.com>
* Fix doc
Signed-off-by: Pascal Rivard <privard@rbbn.com>
* Use repository fields in non-OCI chart download options
Signed-off-by: Pascal Rivard <privard@rbbn.com>
* Update hashes in TestGenerateID
Signed-off-by: Pascal Rivard <privard@rbbn.com>
* Make sure repo exists when using its options
Signed-off-by: Pascal Rivard <privard@rbbn.com>
* Do not add TLS options if PlainHttp is set, adapt unit tests
Signed-off-by: Pascal Rivard <privard@rbbn.com>
* Fix doc
Signed-off-by: Pascal Rivard <privard@rbbn.com>
* Remove 'else if' from appendChartDownloadFlags
Signed-off-by: Pascal Rivard <privard@rbbn.com>
---------
Signed-off-by: Peter Halliday <peter.halliday@servicenow.com>
Signed-off-by: Pascal Rivard <privard@rbbn.com>
Co-authored-by: Peter Halliday <peter.halliday@servicenow.com>
Co-authored-by: Pascal Rivard <privard@rbbn.com>
build(deps): update helm plugins to latest versions
Update the versions of the helm plugins in the Dockerfile to the latest stable versions:
- helm-s3: v0.16.0 -> v0.16.2
This update ensures that the Docker image is using the most up-to-date versions of the helm plugins s3.
Signed-off-by: yxxhero <aiopsclub@163.com>
* fix: inject KubeVersion and ApiVersions in Chartify rendering
fixes#1623
Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>
* test: appendApiVersionsFlags
Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>
* test: add case for appendApiVersionsFlags
Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>
---------
Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>
* Update README.md
Broken links in Status section
Signed-off-by: Jonathan Manton <jonathan@manton.com>
* Update README.md
Broken links in Status section
Signed-off-by: Jonathan Manton <jonathan@manton.com>
* Update README.md
Broken links in Status section
Signed-off-by: Jonathan Manton <jonathan@manton.com>
---------
Signed-off-by: Jonathan Manton <jonathan@manton.com>
* 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>
Add a `--show-only` parameter to the `helmfile template` command to pass
on to the `helm template` command.
Signed-off-by: Jim Barber <jim.barber@healthengine.com.au>
* add the SyncArgs option
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
* add syncArgs to helmDefaults and update index.md
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
* add --sync-args flags to helmfile sync
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
* add tests for appendExtraDiffFlags and appendExtraSyncFlags
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
---------
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
`isReleaseInstalled` will call `helm list` which can take a bit of time.
in order to allow parallelism, we need to use a finer mutex lock.
Signed-off-by: Steven Davidovitz <steven.davidovitz@dominodatalab.com>
* disable version check for sops while building container image
Signed-off-by: Quan TRAN <account@itscaro.me>
Signed-off-by: yxxhero <aiopsclub@163.com>
* 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>
* 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>
This pr fixes auto-wrapping of booleans and integers into quotes when using --state-values-set by:
- Adding: --state-values-set-string flag for intentional string set of boolean or integer
- Changing: --state-values-set flag not wrapping now
- Removing -
Resolves https://github.com/roboll/helmfile/issues/1347
Signed-off-by: Tunahan Sezen <sezentunahan@outlook.com>
* Allow secrets to be excluded from inheritance, small docs update
Signed-off-by: Alex Vorona <alex@vorona.com.ua>
* Fix typo in docs
Signed-off-by: Alex Vorona <alex@vorona.com.ua>
---------
Signed-off-by: Alex Vorona <alex@vorona.com.ua>
The [readthedocs build](https://readthedocs.org/projects/helmfile/builds/) is failing due to a missing required `build.os`
```
Error
Problem in your project's configuration. Invalid configuration option "build.os": build not found
```
Signed-off-by: Joseph Gardner <josephgardner@users.noreply.github.com>
* 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>
* fix: support large output with --enable-live-ouput
This replaces Scanner with ReadString to handle large amount of data returned by helm ouptut when executing diff action
- Changing pkg/helmexec/runner_test.go TestLiveOutput test, adding test with large amount of data, reproducing the issue before applying this fix
- Changing pkg/helmexec/runner.go Scanner with Readstring
Resolves https://github.com/helmfile/helmfile/issues/893
Signed-off-by: Franck Labatut <franck.labatut@ubisoft.com>
* fix: prevent data race
Signed-off-by: Franck Labatut <franck.labatut@ubisoft.com>
---------
Signed-off-by: Franck Labatut <franck.labatut@ubisoft.com>
* Fix symlink behaviour
Make sure to evaluate symlinks when the path is not absolute and not
local. Otherwise just fall back to regular absolute paths.
Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com>
Removes reference to non-existent Helm 3 images
Updates version
Corrects bind mounts for current Dockerfile
Signed-off-by: Daniel Key <daniel@pointyshinyburning.org>
Helmfile is a tool for deploying Helm charts that manages Kubernetes deployments as code. It provides templating, environment management, and GitOps workflows for Helm chart deployments.
Helmfile is a declarative tool. In Helmfile, all elements of the desired state for deployments must be included in the `helmfile.yaml` config file and any associated files. Only operational matters can be provided dynamically, via command-line flags and environment variables.
# Standard build (takes 2-3 minutes due to many dependencies)
make build
# Alternative direct build
go build -o helmfile .
# Build with test tools (required for integration tests, ~1 minute)
make build-test-tools # Creates diff-yamls and downloads dyff
# Cross-platform builds
make cross
```
**Build Timing:** First build downloads 200+ Go packages and takes 2-3 minutes. Subsequent builds are faster due to module cache. Test tools build is faster (~1 minute).
### Validation Pipeline
Run in this exact order to match CI requirements:
```bash
# 1. Code formatting and linting
make check # Run go vet (required - always works)
# Note: make fmt requires gci tool (go install github.com/daixiang0/gci@latest)
# 2. Unit tests (fast, ~30 seconds)
go test -v ./pkg/... -race -p=1
# 3. Integration tests (requires Kubernetes - see Environment Setup)
make integration # Takes 5-10 minutes, needs minikube/k8s cluster
# 4. E2E tests (optional, needs expect package)
sudo apt-get install expect # On Ubuntu/Debian
bash test/e2e/helmfile-init/init_linux.sh
```
### Linting Configuration
Uses golangci-lint with configuration in `.golangci.yaml`. Install via:
- **Integration tests require K8s:** Will fail without cluster access
- **Test isolation:** Use `-p=1` flag to avoid race conditions
- **Minikube timing:** May need to wait for cluster ready state
- **Plugin dependencies:** Tests need helm-diff and helm-secrets plugins
### Runtime Requirements
- **Helm dependency:** Always required at runtime, not just build time (available in CI)
- **kubectl access:** Most operations need valid kubeconfig
- **Plugin management:**`helmfile init` must be run after installation
### Common Error Patterns
```bash
# Missing Helm
"helm: command not found" → Install Helm first
# Plugin missing
"Error: plugin 'diff' not found" → Run helmfile init
# K8s access
"connection refused" → Check kubectl cluster-info
# Permission errors
"permission denied" → Check kubeconfig and cluster access
# Missing tools
"gci: No such file or directory" → go install github.com/daixiang0/gci@latest
```
## Working with the Codebase
### Making Changes
- **Follow Helmfile design**: Helmfile is a declarative deployment tool. Anything that is part of the desired state of the deployments needs to be managed by Helmfile configs. Only operational knowledge that affects "how" to apply the desired state needs to be runtime options, like command-like flags and environment variables.
- **Small, focused changes:** Each PR should address single concern
- **Test coverage:** Add unit tests for new pkg/ functionality
- **Integration tests:** Update test-cases/ for new CLI features
- **Documentation:** Update docs/ for user-facing changes
### Key Packages to Understand
- **pkg/app:** Main business logic, start here for feature changes
- **pkg/state:** Helmfile parsing and release orchestration
- **cmd/:** CLI interface changes and new subcommands
- **pkg/helmexec:** Helm integration and command execution
### Architecture Patterns
- **Dependency injection:** App uses interfaces for testability
- **State management:** Immutable state objects, functional transforms
- **Error handling:** Custom error types with exit codes
- **Plugin system:** Extensible via Helm plugins and Go templates
---
**Trust these instructions:** This information is validated against the current codebase. Only search for additional details if these instructions are incomplete or found to be incorrect for your specific task.
[](https://github.com/helmfile/helmfile/pkgs/container/helmfile)
[](https://github.com/helmfile/helmfile/pkgs/container/helmfile)
[](https://github.com/helmfile/helmfile/pkgs/container/helmfile)
[](https://github.com/helmfile/helmfile/pkgs/container/helmfile)
@ -46,14 +50,10 @@ To avoid upgrades for each iteration of `helm`, the `helmfile` executable delega
## Status
March 2022 Update - The helmfile project has been moved to [helmfile/helmfile](https://github.com/helmfile/helmfile) from the former home `roboll/helmfile`. Please see roboll/helmfile#1824 for more information.
Even though Helmfile is used in production environments [across multiple organizations](USERS.md), it is still in its early stage of development, hence versioned 0.x.
Helmfile complies to Semantic Versioning 2.0.0 in which v0.x means that there could be backward-incompatible changes for every release.
Note that we will try our best to document any backward incompatibility. And in reality, helmfile had no breaking change for a year or so.
May 2025 Update
* Helmfile v1.0 and v1.1 has been released. We recommend upgrading directly to v1.1 if you are still using v0.x.
* If you haven't already upgraded, please go over this v1 proposal [here](docs/proposals/towards-1.0.md) to see a small list of breaking changes.
## Installation
@ -109,6 +109,10 @@ Iterate on the `helmfile.yaml` by referencing:
| [subshell](https://subshell.com) | production | We're using helmfile since 2021 to deploy all our Kubernetes workloads into our clusters. We love helmfile for its simplicity and power. Thank you! | Hamburg, Germany | August 2022 |
| [Norddeutscher Rundfunk](https://www.ndr.de) | production | Using Helmfile since 2020 to deploy workloads to several similar clusters (dev, qa, prod, test, etc.) for sites tagesschau.de and sportschau.de. Thank you so much for your awesome work! | Hamburg, Germany | August 2022 |
| [Dealhub](https://dealhub.io/) | production | Helmfile was an essential part of our k8s migration. Keep up the good work! | Holon, Israel | January 2023 |
| [BlueLabs](https://bluelabs.eu/) | production | Helmfile is the cornerstone of our lightweight, auditable and centralized GKE deployments. | Europe | February 2021 |
| [Zhihu](https://www.zhihu.com/) | production | helmfile is an important tool for the deployment of our basic components, which can achieve standardization and auditability. |China, Beijing | December 2023 |
| [Tudock](https://tudock.de) | production | We have no public post about it, but we recently started using Helmfile to deploy developer applications and have been very happy with the results! | Hamburg, Germany | March 2024 |
| [Incentive.me](https://incentive.me/) | production | We use helmfile as the main tool for deploying our Kubernetes workloads. | Rio de Janeiro, Brazil | November 2021 |
| [RightCapital](https://www.rightcapital.com/) | production | We use helmfile as the main tool for deploying our Kubernetes workloads. | Shelton, CT, USA | May 2019 |
f.StringVar(&applyOptions.Output,"output","","output format for diff plugin")
f.BoolVar(&applyOptions.DetailedExitcode,"detailed-exitcode",false,"return a non-zero exit code 2 instead of 0 when there were changes detected AND the changes are synced successfully")
f.BoolVar(&applyOptions.StripTrailingCR,"strip-trailing-cr",false,"strip trailing carriage return on input")
f.StringVar(&applyOptions.DiffArgs,"diff-args","",`pass args to helm helm-diff`)
f.StringVar(&applyOptions.SyncArgs,"sync-args","",`pass args to helm upgrade`)
f.StringVar(&globalCfg.GlobalOptions.Args,"args","","pass args to helm exec")
if!runtime.V1Mode{
// TODO: Remove this function once Helmfile v0.x
f.BoolVar(&applyOptions.RetainValuesFiles,"retain-values-files",false,"DEPRECATED: Use skip-cleanup instead")
f.BoolVar(&applyOptions.SkipCleanup,"skip-cleanup",false,"Stop cleaning up temporary values generated by helmfile and helm-secrets. Useful for debugging. Don't use in production for security")
f.BoolVar(&applyOptions.SkipCRDs,"skip-crds",false,"if set, no CRDs will be installed on sync. By default, CRDs are installed if not already present")
f.BoolVar(&applyOptions.SkipNeeds,"skip-needs",true,`do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when --selector/-l flag is not provided. Defaults to true when --include-needs or --include-transitive-needs is not provided`)
f.BoolVar(&applyOptions.SuppressSecrets,"suppress-secrets",false,"suppress secrets in the diff output. highly recommended to specify on CI/CD use-cases")
f.BoolVar(&applyOptions.ShowSecrets,"show-secrets",false,"do not redact secret values in the diff output. should be used for debug purpose only")
f.BoolVar(&applyOptions.NoHooks,"no-hooks",false,"do not diff changes made by hooks.")
f.BoolVar(&applyOptions.HideNotes,"hide-notes",false,"add --hide-notes flag to helm")
f.BoolVar(&applyOptions.TakeOwnership,"take-ownership",false,"add --take-ownership flag to helm")
f.BoolVar(&applyOptions.SyncReleaseLabels,"sync-release-labels",false,"sync release labels to the target release")
f.BoolVar(&applyOptions.SuppressDiff,"suppress-diff",false,"suppress diff in the output. Usable in new installs")
f.StringVar(&applyOptions.PostRenderer,"post-renderer","",`pass --post-renderer to "helm template" or "helm upgrade --install"`)
f.StringArrayVar(&applyOptions.PostRendererArgs,"post-renderer-args",nil,`pass --post-renderer-args to "helm template" or "helm upgrade --install"`)
f.BoolVar(&applyOptions.SkipSchemaValidation,"skip-schema-validation",false,`pass --skip-schema-validation to "helm template" or "helm upgrade --install"`)
f.StringVar(&applyOptions.Cascade,"cascade","","pass cascade to helm exec, default: background")
f.StringArrayVar(&applyOptions.SuppressOutputLineRegex,"suppress-output-line-regex",nil,"a list of regex patterns to suppress output lines from the diff output")
f.StringArrayVar(&diffOptions.Suppress,"suppress",nil,"suppress specified Kubernetes objects in the output. Can be provided multiple times. For example: --suppress KeycloakClient --suppress VaultSecret")
f.BoolVar(&diffOptions.TakeOwnership,"take-ownership",false,"add --take-ownership flag to helm")
f.StringVar(&diffOptions.PostRenderer,"post-renderer","",`pass --post-renderer to "helm template" or "helm upgrade --install"`)
f.StringArrayVar(&diffOptions.PostRendererArgs,"post-renderer-args",nil,`pass --post-renderer-args to "helm template" or "helm upgrade --install"`)
f.StringArrayVar(&diffOptions.SuppressOutputLineRegex,"suppress-output-line-regex",nil,"a list of regex patterns to suppress output lines from the diff output")
fs.StringVarP(&globalOptions.HelmBinary,"helm-binary","b",app.DefaultHelmBinary,"Path to the helm binary")
fs.StringVarP(&globalOptions.KustomizeBinary,"kustomize-binary","k",app.DefaultKustomizeBinary,"Path to the kustomize binary")
fs.StringVarP(&globalOptions.File,"file","f","","load config from file or directory. defaults to \"`helmfile.yaml`\" or \"helmfile.yaml.gotmpl\" or \"helmfile.d\" (means \"helmfile.d/*.yaml\" or \"helmfile.d/*.yaml.gotmpl\") in this preference. Specify - to load the config from the standard input.")
fs.StringVarP(&globalOptions.Environment,"environment","e","",`specify the environment name. Overrides "HELMFILE_ENVIRONMENT" OS environment variable when specified. defaults to "default"`)
fs.StringArrayVar(&globalOptions.StateValuesSet,"state-values-set",nil,"set state values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2). Used to override .Values within the helmfile template (not values template).")
fs.StringArrayVar(&globalOptions.StateValuesSetString,"state-values-set-string",nil,"set state STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2). Used to override .Values within the helmfile template (not values template).")
fs.StringArrayVar(&globalOptions.StateValuesFile,"state-values-file",nil,"specify state values in a YAML file. Used to override .Values within the helmfile template (not values template).")
fs.BoolVar(&globalOptions.SkipDeps,"skip-deps",false,`skip running "helm repo update" and "helm dependency build"`)
fs.BoolVar(&globalOptions.StripArgsValuesOnExitError,"strip-args-values-on-exit-error",true,`Strip the potential secret values of the helm command args contained in a helmfile error message`)
fs.BoolVar(&globalOptions.DisableForceUpdate,"disable-force-update",false,`do not force helm repos to update when executing "helm repo add"`)
fs.BoolVarP(&globalOptions.Quiet,"quiet","q",false,"Silence output. Equivalent to log-level warn")
fs.StringVar(&globalOptions.Kubeconfig,"kubeconfig","","Use a particular kubeconfig file")
fs.StringVar(&globalOptions.KubeContext,"kube-context","","Set kubectl context. Uses current context by default")
fs.BoolVar(&globalOptions.Debug,"debug",false,"Enable verbose output for Helm and set log-level to debug, this disables --quiet/-q effect")
fs.BoolVar(&globalOptions.Color,"color",false,"Output with color")
Short:"It prints a table with 3 columns, GROUP, RELEASE, and DEPENDENCIES. GROUP is the unsigned, monotonically increasing integer starting from 1. All the releases with the same GROUP are deployed concurrently. Everything in GROUP 2 starts being deployed only after everything in GROUP 1 got successfully deployed. RELEASE is the release that belongs to the GROUP. DEPENDENCIES is the list of releases that the RELEASE depends on. It should always be empty for releases in GROUP 1. DEPENDENCIES for a release in GROUP 2 should have some or all dependencies appeared in GROUP 1. It can be \"some\" because Helmfile simplifies the DAGs of releases into a DAG of groups, so that Helmfile always produce a single DAG for everything written in helmfile.yaml, even when there are technically two or more independent DAGs of releases in it.",
f.BoolVar(&syncOptions.SkipCRDs,"skip-crds",false,"if set, no CRDs will be installed on sync. By default, CRDs are installed if not already present")
f.BoolVar(&syncOptions.IncludeNeeds,"include-needs",false,`automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when --selector/-l flag is not provided`)
f.BoolVar(&syncOptions.IncludeTransitiveNeeds,"include-transitive-needs",false,`like --include-needs, but also includes transitive needs (needs of needs). Does nothing when --selector/-l flag is not provided. Overrides exclusions of other selectors and conditions.`)
f.BoolVar(&syncOptions.HideNotes,"hide-notes",false,"add --hide-notes flag to helm")
f.BoolVar(&syncOptions.TakeOwnership,"take-ownership",false,`add --take-ownership flag to helm`)
f.BoolVar(&syncOptions.SyncReleaseLabels,"sync-release-labels",false,"sync release labels to the target release")
f.IntVar(&syncOptions.Timeout,"timeout",0,`Override helmDefaults.timeout setting "helm upgrade --install --timeout" (default 0, which means no timeout)`)
f.StringVar(&syncOptions.PostRenderer,"post-renderer","",`pass --post-renderer to "helm template" or "helm upgrade --install"`)
f.StringArrayVar(&syncOptions.PostRendererArgs,"post-renderer-args",nil,`pass --post-renderer-args to "helm template" or "helm upgrade --install"`)
f.BoolVar(&syncOptions.SkipSchemaValidation,"skip-schema-validation",false,`pass --skip-schema-validation to "helm template" or "helm upgrade --install"`)
f.StringVar(&syncOptions.Cascade,"cascade","","pass cascade to helm exec, default: background")
f.BoolVar(&templateOptions.IncludeNeeds,"include-needs",false,`automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when --selector/-l flag is not provided`)
f.BoolVar(&templateOptions.IncludeTransitiveNeeds,"include-transitive-needs",false,`like --include-needs, but also includes transitive needs (needs of needs). Does nothing when --selector/-l flag is not provided. Overrides exclusions of other selectors and conditions.`)
f.BoolVar(&templateOptions.SkipCleanup,"skip-cleanup",false,"Stop cleaning up temporary values generated by helmfile and helm-secrets. Useful for debugging. Don't use in production for security")
f.BoolVar(&templateOptions.NoHooks,"no-hooks",false,"do not template files made by hooks.")
f.StringVar(&templateOptions.PostRenderer,"post-renderer","",`pass --post-renderer to "helm template" or "helm upgrade --install"`)
f.StringArrayVar(&templateOptions.PostRendererArgs,"post-renderer-args",nil,`pass --post-renderer-args to "helm template" or "helm upgrade --install"`)
f.BoolVar(&templateOptions.SkipSchemaValidation,"skip-schema-validation",false,`pass skip-schema-validation to "helm template" or "helm upgrade --install"`)
f.StringVar(&templateOptions.KubeVersion,"kube-version","",`pass --kube-version to "helm template". Overrides kubeVersion in helmfile.yaml`)
f.StringArrayVar(&templateOptions.ShowOnly,"show-only",nil,`pass --show-only to "helm template"`)
The following functions are all from the [go-cty](https://pkg.go.dev/github.com/zclconf/go-cty/cty/function/stdlib#pkg-functions), [go-cty-yaml](https://pkg.go.dev/github.com/zclconf/go-cty-yaml) and [hcl](https://pkg.go.dev/github.com/hashicorp/hcl/v2@v2.20.1/ext/tryfunc#section-readme) libraries
#### abs
`abs` returns the absolute value
```
abs(number)
```
```
abs(-1)
# 1
abs(2)
# 2
```
#### can
`can` evaluates an expression and returns a boolean if a result can be produced without any error
```
can(expr)
```
```
map = {
myvar = "myvar"
}
can1 = can(hv.map.myVar)
# true
can2 = can(hv.map.notMyVar)
# false
```
#### ceil
`ceil` returns the ceiling value of a given number
```
ceil(number)
```
```
ceil(1)
# 1
ceil(1.1)
# 2
```
#### chomp
`chomp` removes newline characters at the end of a string.
```
chomp(string)
```
```
chomp("myVar\n")
# myVar
```
#### coalesce
`coalesce` returns the first of the given arguments that is not null. If all arguments are null, an error is produced.
All arguments must be of the same type apart from some cases
```
coalesce(any...)
```
```
coalesce(null, 2)
# 2
coalesce(null, "value")
# value
```
Use the three dots notation `...` to expand a list
```
coalesce([null, "value"]...)
# value
```
#### coalescelist
`coalescelist` takes any number of list arguments and returns the first one that isn't empty.
```
coalescelist(list)
```
```
coalescelist([], ["value"])
# ["value"]
```
Use the three dots notation `...` when using list of lists
```
coalescelist([[], ["val1", "val2"]]...)
# ["val1", "val2"]
```
#### compact
`compact` returns a new list with any empty string elements removed.
```
compact(list)
```
```
compact(["", "val1", "val2"])
# ["val1", "val2"]
```
#### concat
`concat` takes one or more sequences (lists or tuples) and returns the single sequence that results from concatenating them together in order.
```
concat(list, list...)
```
```
concat(["val1"], ["val2", "val3"])
# ["val1", "val2", "val3"]
```
#### contains
`contains` returns a boolean if a list contains a given value
```
contains(list, value)
```
```
contains(["val1", "val2"], "val2")
# true
```
#### csvdecode
`csvdecode` decodes a CSV-formatted string into a list of maps
```
csvdecode(string)
```
```
csvdecode("col1,col2\nv1,v2\nv3,v4")
###
[
{
"col1" = "v1"
"col2" = "v2"
},
{
"col1" = "v3"
"col2" = "v4"
}
]
```
#### distinct
`distinct` returns a new list from another by removing all duplicates
```
distinct(list)
```
```
distinct(["v1","v1","v2"])
["v1", "v2"]
```
#### element
`element` returns a single element from a given list at the given index. If index is greater than the length of the list then it is wrapped modulo the list length
```
element(list, index)
```
```
element(["val1","val2"], 1)
# val2
```
#### chunklist
`chunklist` splits a single list into fixed-size chunks, returning a list of lists.
```
chunklist(list, size)
```
```
chunklist(["a","b"], 1)
# [["a"], ["b"]]
```
#### flatten
`flatten` takes a list and replaces any elements that are lists with a flattened sequence of the list contents.
```
flatten(list)
```
```
flatten([["a"], ["a","b"], ["c"]])
# ["a","a","b","c"]
```
#### floor
`floor` returns the closest whole number lesser than or equal to the given value.
```
floor(number)
```
```
floor(1)
# 1
floor(0.7)
# 0
```
#### format
`format` produces a string representation of zero or more values using a format string similar to the "printf" function in C.
`formatlist` does the same as `format` but for a list of strings
```
formatlist(formatString, values...)
```
```
formatlist("%s", ["Hello", "World"])
###
[
"Hello",
"World"
]
formatlist("%s %s", "hello", ["World", "You"])
###
[
"hello World",
"hello You",
]
```
#### indent
`indent` adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
```
indent(number, string)
```
```
indent(4, "hello,\nWorld\n!")
###
hello
World
!
```
#### int
`int` removes the fractional component of the given number returning an integer representing the whole number component, rounding towards zero.
```
int(number)
```
```
int(6.2)
# 6
```
#### join
`join` concatenates together the string elements of one or more lists with a given separator.
```
join(listOfStrings, separator)
```
```
join(" ", ["hello", "world"])
# hello world
```
#### jsondecode
`jsondecode` parses the given JSON string and, if it is valid, returns the value it represents.
```
jsonencode(string)
```
Example :
```
jsonencode({"hello"="world"})
# {"hello": "world"}
```
#### jsonencode
`jsonencode` returns a JSON serialization of the given value.
```
jsondecode(string)
```
Example :
```
jsondecode("{\"hello\": \"world\"}")
# { hello = "world" }
```
#### keys
`keys` takes a map and returns a sorted list of the map keys.
```
keys(map)
```
```
keys({val1=1, val2=2, val3=3})
# ["val1","val2","val3"]
```
#### length
`length` returns the number of elements in the given __collection__.
See `strlen` for strings
```
length(list)
```
```
length([1,2,3])
# 3
```
#### log
`log` returns returns the logarithm of a given number in a given base.
```
log(number, base)
```
```
log(1, 10)
# 0
```
#### lookup
`lookup` performs a dynamic lookup into a map. There are three required arguments, inputMap and key, plus a defaultValue, which is a value to return if the given key is not found in the inputMap.
```
lookup(inputMap, key, defaultValue)
```
```
map = { "luke" = "skywalker"}
lookup(hv.maptest, "luke", "none")
# skywalker
lookup(hv.maptest, "leia", "none")
# none
```
#### lower
`lower` is a Function that converts a given string to lowercase.
```
lower(string)
```
```
lower("HELLO world")
# hello world
```
#### max
`max` returns the maximum number from the given numbers.
```
max(numbers)
```
```
max(1,128,70)
# 128
```
#### merge
`merge` takes an arbitrary number of maps and returns a single map that contains a merged set of elements from all of the maps.
```
merge(maps)
```
```
merge({a="1"}, {a=[1,2], c="world"}, {d=40})
# { a = [1,2], c = "world", d = 40}
```
#### min
`min` returns the minimum number from the given numbers.
```
min(numbers)
```
```
min(1,128,70)
# 1
```
#### parseint
`parseint` parses a string argument and returns an integer of the specified base.
```
parseint(string, base)
```
```
parseint("190", 10)
# 190
parseint("11001", 2)
# 25
```
#### pow
`pow` returns the logarithm of a given number in a given base.
```
pow(number, power)
```
```
pow(1, 10)
# 1
pow(3, 12)
# 531441
```
#### range
`range` creates a list of numbers by starting from the given starting value, then adding the given step value until the result is greater than or equal to the given stopping value. Each intermediate result becomes an element in the resulting list.
```
range(startingNumber, stoppingNumber, stepNumber)
```
```
range(1, 10, 3)
# [1, 4, 7]
```
#### regex
`regex` is a function that extracts one or more substrings from a given string by applying a regular expression pattern, describing the first match.
The return type depends on the composition of the capture groups (if any) in the pattern:
If there are no capture groups at all, the result is a single string representing the entire matched pattern.
If all of the capture groups are named, the result is an object whose keys are the named groups and whose values are their sub-matches, or null if a particular sub-group was inside another group that didn't match.
If none of the capture groups are named, the result is a tuple whose elements are the sub-groups in order and whose values are their sub-matches, or null if a particular sub-group was inside another group that didn't match.
It is invalid to use both named and un-named capture groups together in the same pattern.
If the pattern doesn't match, this function returns an error. To test for a match, call `regexall` and check if the length of the result is greater than zero.
```
regex(pattern, string)
```
```
regex("[0-9]+", "v1.2.3")
# 1
```
#### regexall
`regexall` is similar to Regex but it finds all of the non-overlapping matches in the given string and returns a list of them.
The result type is always a list, whose element type is deduced from the pattern in the same way as the return type for Regex is decided.
If the pattern doesn't match at all, this function returns an empty list.
```
regexall(pattern, string)
```
```
regexall("[0-9]+", "v1.2.3")
# [1 2 3]
```
#### setintersection
`setintersection` returns a new set containing the elements that exist in all of the given sets, which must have element types that can all be converted to some common type using the standard type unification rules. If conversion is not possible, an error is returned.
`setsubtract` returns a new set containing the elements from the first set that are not present in the second set. The sets must have element types that can both be converted to some common type using the standard type unification rules. If conversion is not possible, an error is returned.
```
setsubtract(sets...)
```
```
setsubtract(["a", "b", "c"], ["a", "b"])
###
["c"]
```
#### setunion
`setunion` returns a new set containing all of the elements from the given sets, which must have element types that can all be converted to some common type using the standard type unification rules. If conversion is not possible, an error is returned.
```
setunion(sets...)
```
```
setunion(["a", "b"], ["b", "c"], ["a", "d"])
###
["a", "b", "c", "d"]
```
#### signum
`signum` determines the sign of a number, returning a number between -1 and 1 to represent the sign.
```
signum(number)
```
```
signum(-182)
# -1
```
#### slice
`slice` extracts some consecutive elements from within a list.
`sort` re-orders the elements of a given list of strings so that they are in ascending lexicographical order.
```
sort(list)
```
```
sort(["1", "h", "r", "p", "word"])
# ["1", "h", "p", "r", "word"]
```
#### split
`split` divides a given string by a given separator, returning a list of strings containing the characters between the separator sequences.
```
split(separatorString, string)
```
```
split(".", "host.domain")
# ["host", "domain"]
```
#### strlen
`strlen` is a Function that returns the length of the given string in characters.
```
strlen(string)
```
```
strlen("yes")
# 3
```
#### strrev
`strrev` is a Function that reverses the order of the characters in the given string.
```
strrev(string)
```
```
strrev("yes")
# "sey"
```
#### substr
`substr` is a Function that extracts a sequence of characters from another string and creates a new string.
```
substr(string, offsetNumber, length)
```
```
substr("host.domain", 0, 4)
# "host"
```
#### timeadd
`timeadd` adds a duration to a timestamp, returning a new timestamp.
Only units "inferior" or equal to `h` are supported.
The duration can be negative.
```
substr(timestamp, duration)
```
```
timeadd("2024-01-01T00:00:00Z", "-2600h10m")
# 2023-09-14T15:50:00Z
```
#### trim
`trim` removes the specified characters from the start and end of the given string.
```
trim(string, string)
```
```
trim("Can you do that ? Yes ?", "?")
# "Can you do that ? Yes"
```
#### trimprefix
`trimprefix` removes the specified prefix from the start of the given string.
```
trimprefix(stringToTrim, trimmingString)
```
```
trimprefix("please, do it", "please, ")
# "do it"
```
#### trimspace
`trimspace` removes any space characters from the start and end of the given string.
```
trimspace(string)
```
```
trimspace(" Hello World ")
# "Hello World"
```
#### trimsuffix
`trimsuffix` removes the specified suffix from the end of the given string.
```
trimsuffix(stringToTrim, trimmingString)
```
```
trimsuffix("Hello World", " World")
# "Hello"
```
#### try
`try` is a variadic function that tries to evaluate all of is arguments in sequence until one succeeds, in which case it returns that result, or returns an error if none of them succeed.
```
try(expressions...)
```
```
values {
map = {
hello = "you"
world = "us"
}
try(hv.map.do_not_exist, hv.map.world)
}
# "us"
```
#### upper
`upper` is a Function that converts a given string to uppercase.
```
upper(string)
```
```
upper("up")
# "UP"
```
#### values
`values` returns a list of the map values, in the order of the sorted keys. This function only works on flat maps.
```
values(map)
```
```
values({"a" = 1,"b" = 2})
# [1, 2]
```
#### yamldecode
`yamldecode` parses the given JSON string and, if it is valid, returns the value it represents.
```
yamldecode(string)
```
```
yamldecode("hello: world\narray: [1, 2, 3]")
###
{
array = [1, 2, 3]
hello = "world"
}
```
#### yamlencode
`yamlencode` returns a JSON serialization of the given value.
```
yamlencode({array = [1, 2, 3], hello = "world"})
```
```
yamlencode({array = [1, 2, 3], hello = "world"})
###
"array":
- 1
- 2
- 3
"hello": "world"
```
#### zipmap
`zipmap` constructs a map from a list of keys and a corresponding list of values.
[](https://github.com/helmfile/helmfile/pkgs/container/helmfile)
[](https://github.com/helmfile/helmfile/pkgs/container/helmfile)
March 2022 Update - The helmfile project has been moved to [helmfile/helmfile](https://github.com/helmfile/helmfile) from the former home `roboll/helmfile`. Please see [roboll/helmfile#1824](https://github.com/roboll/helmfile/issues/1824) for more information.
May 2025 Update
Even though Helmfile is used in production environments [across multiple organizations](users.md), it is still in its early stage of development, hence versioned 0.x.
Helmfile complies to Semantic Versioning 2.0.0 in which v0.x means that there could be backward-incompatible changes for every release.
Note that we will try our best to document any backward incompatibility. And in reality, helmfile had no breaking change for a year or so.
* Helmfile v1.0 and v1.1 has been released. We recommend upgrading directly to v1.1 if you are still using v0.x.
* If you haven't already upgraded, please go over this v1 proposal [here](https://github.com/helmfile/helmfile/blob/main/docs/proposals/towards-1.0.md) to see a small list of breaking changes.
## About
@ -63,27 +60,16 @@ To avoid upgrades for each iteration of `helm`, the `helmfile` executable delega
### Running as a container
The [Helmfile Docker images are available in GHCR](https://github.com/helmfile/helmfile/pkgs/container/helmfile). There is no `latest` tag, since the `0.x` versions can contain breaking changes, so make sure you pick the right tag. Example using `helmfile 0.145.2`:
The [Helmfile Docker images are available in GHCR](https://github.com/helmfile/helmfile/pkgs/container/helmfile). There is no `latest` tag, since the `0.x` versions can contain breaking changes, so make sure you pick the right tag. Example using `helmfile 0.156.0`:
# verify the chart before upgrading (only works with packaged charts not directories) (default false)
verify: true
keyring: path/to/keyring.gpg
# --skip-schema-validation flag to helm 'install', 'upgrade' and 'lint', starts with helm 3.16.0 (default false)
skipSchemaValidation: false
# wait for k8s resources via --wait. (default false)
wait: true
# DEPRECATED: waitRetries is no longer supported as the --wait-retries flag was removed from Helm.
# This configuration is ignored and preserved only for backward compatibility.
# waitRetries: 3
# if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. It will wait for as long as --timeout (default false, Implemented in Helm3.5)
waitForJobs: true
# time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks, and waits on pod/pvc/svc/deployment readiness) (default 300)
@ -209,10 +219,28 @@ helmDefaults:
reuseValues: false
# propagate `--post-renderer` to helmv3 template and helm install
postRenderer: "path/to/postRenderer"
# propagate `--post-renderer-args` to helmv3 template and helm install. This allows using Powershell
# scripts on Windows as a post renderer
postRendererArgs:
- PowerShell
- "-Command"
- "theScript.ps1"
# cascade `--cascade` to helmv3 delete, available values: background, foreground, or orphan, default: background
cascade: "background"
# insecureSkipTLSVerify is true if the TLS verification should be skipped when fetching remote chart
insecureSkipTLSVerify: false
# plainHttp is true if fetching the remote chart should be done using HTTP
plainHttp: false
# --wait flag for destroy/delete, if set to true, will wait until all resources are deleted before mark delete command as successful
deleteWait: false
# Timeout is the time in seconds to wait for helmfile destroy/delete (default 300)
deleteTimeout: 300
# suppressOutputLineRegex is a list of regex patterns to suppress output lines from helm diff (default []), available in helmfile v0.162.0
suppressOutputLineRegex:
- "version"
# syncReleaseLabels is a list of labels to be added to the release when syncing.
syncReleaseLabels: false
# these labels will be applied to all releases in a Helmfile. Useful in templating if you have a helmfile per environment or customer and don't want to copy the same label to each release
* `HELMFILE_USE_HELM_STATUS_TO_CHECK_RELEASE_EXISTENCE` - expecting non-empty value to use `helm status` to check release existence, instead of `helm list` which is the default behaviour
* `HELMFILE_EXPERIMENTAL` - enable experimental features, expecting `true` lower case
* `HELMFILE_ENVIRONMENT` - specify [Helmfile environment](https://helmfile.readthedocs.io/en/latest/#environment), it has lower priority than CLI argument `--environment`
* `HELMFILE_TEMPDIR` - specify directory to store temporary files
* `HELMFILE_UPGRADE_NOTICE_DISABLED` - expecting any non-empty value to skip the check for the latest version of Helmfile in [helmfile version](https://helmfile.readthedocs.io/en/latest/#version)
* `HELMFILE_V1MODE` - Helmfile v0.x behaves like v1.x with `true`, Helmfile v1.x behaves like v0.x with `false` as value
* `HELMFILE_GOCCY_GOYAML` - use *goccy/go-yaml* instead of *gopkg.in/yaml.v2*. It's `false` by default in Helmfile v0.x and `true` by default for Helmfile v1.x.
* `HELMFILE_GO_YAML_V3` - use *go.yaml.in/yaml/v3* instead of *go.yaml.in/yaml/v2*. It's `false` by default in Helmfile v0.x, and `true` in Helmfile v1.x.
* `HELMFILE_CACHE_HOME` - specify directory to store cached files for remote operations
* `HELMFILE_FILE_PATH` - specify the path to the helmfile.yaml file
* `HELMFILE_INTERACTIVE` - enable interactive mode, expecting `true` lower case. The same as `--interactive` CLI flag
## CLI Reference
```
Declaratively deploy your Kubernetes manifests, Kustomize configs, and Charts as Helm releases in one shot
V1 mode = false
YAML library = gopkg.in/yaml.v2
YAML library = go.yaml.in/yaml/v3
Usage:
helmfile [command]
@ -531,6 +610,7 @@ Available Commands:
lint Lint charts from state file (helm lint)
list List releases defined in state file
repos Add chart repositories defined in state file
show-dag It prints a table with 3 columns, GROUP, RELEASE, and DEPENDENCIES. GROUP is the unsigned, monotonically increasing integer starting from 1. All the releases with the same GROUP are deployed concurrently. Everything in GROUP 2 starts being deployed only after everything in GROUP 1 got successfully deployed. RELEASE is the release that belongs to the GROUP. DEPENDENCIES is the list of releases that the RELEASE depends on. It should always be empty for releases in GROUP 1. DEPENDENCIES for a release in GROUP 2 should have some or all dependencies appeared in GROUP 1. It can be "some" because Helmfile simplifies the DAGs of releases into a DAG of groups, so that Helmfile always produce a single DAG for everything written in helmfile.yaml, even when there are technically two or more independent DAGs of releases in it.
status Retrieve status of releases in state file
sync Sync releases defined in state file
template Template releases defined in state file
@ -539,36 +619,40 @@ Available Commands:
write-values Write values files for releases. Similar to `helmfile template`, write values files instead of manifests.
Flags:
--allow-no-matching-release Do not exit with an error code if the provided selector has no matching releases.
-c, --chart string Set chart. Uses the chart set in release by default, and is available in template as {{ .Chart }}
--color Output with color
--debug Enable verbose output for Helm and set log-level to debug, this disables --quiet/-q effect
--disable-force-update do not force helm repos to update when executing "helm repo add"
--enable-live-output Show live output from the Helm binary Stdout/Stderr into Helmfile own Stdout/Stderr.
It only applies for the Helm CLI commands, Stdout/Stderr for Hooks are still displayed only when it's execution finishes.
-e, --environment string specify the environment name. Overrides "HELMFILE_ENVIRONMENT" OS environment variable when specified. defaults to "default"
-f, --file helmfile.yaml load config from file or directory. defaults to "helmfile.yaml" or "helmfile.yaml.gotmpl" or "helmfile.d" (means "helmfile.d/*.yaml" or "helmfile.d/*.yaml.gotmpl") in this preference. Specify - to load the config from the standard input.
-b, --helm-binary string Path to the helm binary (default "helm")
-h, --help help for helmfile
-i, --interactive Request confirmation before attempting to modify clusters
--kube-context string Set kubectl context. Uses current context by default
--log-level string Set log level, default info (default "info")
-n, --namespace string Set namespace. Uses the namespace set in the context by default, and is available in templates as {{ .Namespace }}
--no-color Output without color
-q, --quiet Silence output. Equivalent to log-level warn
-l, --selector stringArray Only run using the releases that match labels. Labels can take the form of foo=bar or foo!=bar.
A release must match all labels in a group in order to be used. Multiple groups can be specified at once.
"--selector tier=frontend,tier!=proxy --selector tier=backend" will match all frontend, non-proxy releases AND all backend releases.
The name of a release can be used as a label: "--selector name=myrelease"
--skip-deps skip running "helm repo update" and "helm dependency build"
--state-values-file stringArray specify state values in a YAML file. Used to override .Values within the helmfile template (not values template).
--state-values-set stringArray set state values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2). Used to override .Values within the helmfile template (not values template).
--strip-args-values-on-exit-error On exit error, strip the values of the args
-v, --version version for helmfile
--allow-no-matching-release Do not exit with an error code if the provided selector has no matching releases.
-c, --chart string Set chart. Uses the chart set in release by default, and is available in template as {{ .Chart }}
--color Output with color
--debug Enable verbose output for Helm and set log-level to debug, this disables --quiet/-q effect
--disable-force-update do not force helm repos to update when executing "helm repo add"
--enable-live-output Show live output from the Helm binary Stdout/Stderr into Helmfile own Stdout/Stderr.
It only applies for the Helm CLI commands, Stdout/Stderr for Hooks are still displayed only when it's execution finishes.
-e, --environment string specify the environment name. Overrides "HELMFILE_ENVIRONMENT" OS environment variable when specified. defaults to "default"
-f, --file helmfile.yaml load config from file or directory. defaults to "helmfile.yaml" or "helmfile.yaml.gotmpl" or "helmfile.d" (means "helmfile.d/*.yaml" or "helmfile.d/*.yaml.gotmpl") in this preference. Specify - to load the config from the standard input.
-b, --helm-binary string Path to the helm binary (default "helm")
-h, --help help for helmfile
-i, --interactive Request confirmation before attempting to modify clusters
--kube-context string Set kubectl context. Uses current context by default
-k, --kustomize-binary string Path to the kustomize binary (default "kustomize")
--log-level string Set log level, default info (default "info")
-n, --namespace string Set namespace. Uses the namespace set in the context by default, and is available in templates as {{ .Namespace }}
--no-color Output without color
-q, --quiet Silence output. Equivalent to log-level warn
-l, --selector stringArray Only run using the releases that match labels. Labels can take the form of foo=bar or foo!=bar.
A release must match all labels in a group in order to be used. Multiple groups can be specified at once.
"--selector tier=frontend,tier!=proxy --selector tier=backend" will match all frontend, non-proxy releases AND all backend releases.
The name of a release can be used as a label: "--selector name=myrelease"
--skip-deps skip running "helm repo update" and "helm dependency build"
--state-values-file stringArray specify state values in a YAML file. Used to override .Values within the helmfile template (not values template).
--state-values-set stringArray set state values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2). Used to override .Values within the helmfile template (not values template).
--state-values-set-string stringArray set state STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2). Used to override .Values within the helmfile template (not values template).
--strip-args-values-on-exit-error Strip the potential secret values of the helm command args contained in a helmfile error message (default true)
-v, --version version for helmfile
Use "helmfile [command] --help" for more information about a command.
```
**Note:** Each command has its own specific flags. Use `helmfile [command] --help` to see command-specific options. For example, `helmfile sync --help` shows operational flags like `--timeout`, `--wait`, and `--wait-for-jobs`.
### init
The `helmfile init` sub-command checks the dependencies required for helmfile operation, such as `helm`, `helm diff plugin`, `helm secrets plugin`, `helm helm-git plugin`, `helm s3 plugin`. When it does not exist or the version is too low, it can be installed automatically.
@ -584,6 +668,25 @@ The `helmfile sync` sub-command sync your cluster state as described in your `he
Under the covers, Helmfile executes `helm upgrade --install` for each `release` declared in the manifest, by optionally decrypting [secrets](#secrets) to be consumed as helm chart values. It also updates specified chart repositories and updates the
dependencies of any referenced local charts.
#### Common sync flags
* `--timeout SECONDS` - Override the default timeout for all releases in this sync operation. This takes precedence over `helmDefaults.timeout` and per-release `timeout` settings.
* `--wait` - Override the default wait behavior for all releases
* `--wait-for-jobs` - Override the default wait-for-jobs behavior for all releases
For Helm 2.9+ you can use a username and password to authenticate to a remote repository.
### deps
@ -624,7 +727,7 @@ The `helmfile destroy` sub-command uninstalls and purges all the releases define
`helmfile --interactive destroy` instructs Helmfile to request your confirmation before actually deleting releases.
`destroy` basically runs `helm uninstall --purge` on all the targeted releases. If you don't want purging, use `helmfile delete` instead.
If `--skip-charts` flag is not set, destory would prepare all releases, by fetching charts and templating them.
If `--skip-charts` flag is not set, destroy would prepare all releases, by fetching charts and templating them.
### delete (DEPRECATED)
@ -633,7 +736,7 @@ The `helmfile delete` sub-command deletes all the releases defined in the manife
`helmfile --interactive delete` instructs Helmfile to request your confirmation before actually deleting releases.
Note that `delete` doesn't purge releases. So `helmfile delete && helmfile sync` results in sync failed due to that releases names are not deleted but preserved for future references. If you really want to remove releases for reuse, add `--purge` flag to run it like `helmfile delete --purge`.
If `--skip-charts` flag is not set, destory would prepare all releases, by fetching charts and templating them.
If `--skip-charts` flag is not set, destroy would prepare all releases, by fetching charts and templating them.
### secrets
@ -670,6 +773,16 @@ The `helmfile version` sub-command prints the version of Helmfile.Optional `-o`
default it will check for the latest version of Helmfile and print a tip if the current version is not the latest. To disable this behavior, set environment variable `HELMFILE_UPGRADE_NOTICE_DISABLED` to any non-empty value.
### show-dag
It prints a table with 3 columns, GROUP, RELEASE, and DEPENDENCIES.
GROUP is the unsigned, monotonically increasing integer starting from 1. All the releases with the same GROUP are deployed concurrently. Everything in GROUP 2 starts being deployed only after everything in GROUP 1 got successfully deployed.
RELEASE is the release that belongs to the GROUP.
DEPENDENCIES is the list of releases that the RELEASE depends on. It should always be empty for releases in GROUP 1. DEPENDENCIES for a release in GROUP 2 should have some or all dependencies appeared in GROUP 1. It can be "some" because Helmfile simplifies the DAGs of releases into a DAG of groups, so that Helmfile always produce a single DAG for everything written in helmfile.yaml, even when there are technically two or more independent DAGs of releases in it.
## Paths Overview
Using manifest files in conjunction with command line argument can be a bit confusing.
@ -687,7 +800,7 @@ For additional context, take a look at [paths examples](paths.md).
A selector can be used to only target a subset of releases when running Helmfile. This is useful for large helmfiles with releases that are logically grouped together.
Labels are simple key value pairs that are an optional field of the release spec. When selecting by label, the search can be inverted. `tier!=backend` would match all releases that do NOT have the `tier: backend` label. `tier=fronted` would only match releases with the `tier: frontend` label.
Labels are simple key value pairs that are an optional field of the release spec. When selecting by label, the search can be inverted. `tier!=backend` would match all releases that do NOT have the `tier: backend` label. `tier=frontend` would only match releases with the `tier: frontend` label.
Multiple labels can be specified using `,` as a separator. A release must match all selectors in order to be selected for the final helm command.
@ -835,6 +948,7 @@ proxy:
When you want to customize the contents of `helmfile.yaml` or `values.yaml` files per environment, use this feature.
You can define as many environments as you want under `environments` in `helmfile.yaml`.
`environments` section should be separated from `releases` with `---`.
The environment name defaults to `default`, that is, `helmfile sync` implies the `default` environment.
The selected environment name can be referenced from `helmfile.yaml` and `values.yaml.gotmpl` by `{{ .Environment.Name }}`.
@ -858,9 +972,13 @@ releases:
# snip
```
## Environment Values
### Environment Values
Helmfile supports 3 values languages :
- Straight yaml
- Go templates to generate straight yaml
- HCL
Environment Values allows you to inject a set of values specific to the selected environment, into values.yaml templates.
Environment Values allows you to inject a set of values specific to the selected environment, into `values.yaml` templates.
Use it to inject common values from the environment to multiple values files, to make your configuration DRY.
Suppose you have three files `helmfile.yaml`, `production.yaml` and `values.yaml.gotmpl`:
@ -929,7 +1047,45 @@ releases:
...
```
### Note on Environment.Values vs Values
#### HCL specifications
Since Helmfile v0.164.0, HCL language is supported for environment values only.
HCL values supports interpolations and sharing values across files
* Only `.hcl` suffixed files will be interpreted as is
* Helmfile supports 2 differents blocks: `values` and `locals`
* `values` block is a shared block where all values are accessible everywhere in all loaded files
* `locals` block can't reference external values apart from the ones in the block itself, and where its defined values are only accessible in its local file
* Only values in `values` blocks are made available to the final root `.Values` (e.g : ` values { myvar = "var" }` is accessed through `{{ .Values.myvar }}`)
* There can only be 1 `locals` block per file
* Helmfile hcl `values` are referenced using the `hv` accessor.
* Helmfile hcl `locals` are referenced using the `local` accessor.
* Duplicated variables across .hcl `values` blocks are forbidden (An error will pop up specifying where are the duplicates)
* All cty [standard library functions](`https://pkg.go.dev/github.com/zclconf/go-cty@v1.14.3/cty/function/stdlib`) are available and custom functions could be created in the future
For more information about the supported protocols see: [go-getter Protocol-Specific Options](https://github.com/hashicorp/go-getter#protocol-specific-options-1).
This is particularly useful when you co-locate helmfiles within your project repo but want to reuse the definitions in a global repo.
## Environment Secrets
### Environment Secrets
Environment Secrets *(not to be confused with Kubernetes Secrets)* are encrypted versions of `Environment Values`.
You can list any number of `secrets.yaml` files created using `helm secrets` or `sops`, so that
@ -1009,7 +1135,7 @@ Then the environment secret `foo.bar` can be referenced by the below template ex
{{ .Values.foo.bar }}
```
### Loading remote Environment secrets files
#### Loading remote Environment secrets files
Since Helmfile v0.149.0, you can use `go-getter`-style URLs to refer to remote secrets files, the same way as in values files:
For more information about the supported protocols see: [go-getter Protocol-Specific Options](https://github.com/hashicorp/go-getter#protocol-specific-options-1).
This is particularly useful when you co-locate helmfiles within your project repo but want to reuse the definitions in a global repo.
### Environment values precedence
With the introduction of HCL, a new value precedence was introduced over environment values.
Here is the order of precedence from least to greatest (the last one overrides all others)
1. `yaml` / `yaml.gotmpl`
2. `hcl`
3. `yaml` secrets
Example:
---
```yaml
# values1.yaml
domain: "dev.example.com"
```
```terraform
# values2.hcl
values {
domain = "overdev.example.com"
willBeOverriden = "override_me"
}
```
```yaml
# secrets.yml (assuming this one has been encrypted)
@ -4,6 +4,22 @@ I'd like to make 3 breaking changes to Helmfile and mark it as 1.0, so that we c
Note that every breaking change should have an easy alternative way to achieve the same goal achieved using the removed functionality.
## Backward compatibility
v1 is backward-compatible with v0.x, except for the following breaking changes.
Each breaking change has an easy alternative way to achieve the same goal achieved using the removed functionality.
We also provide the alternative way in the latest v0.x release before v1.0. That way you can start using the alternative way today and be ready for v1.0. Note that in v0.x, some of those alternative ways are enabled only when `HELMFILE_V1MODE=true` is set.
> Context:
>
> Even though Helmfile had been used in production environments [across multiple organizations](USERS.md), it had been considered to be in its early stage of development, hence versioned 0.x.
>
> Helmfile complies to Semantic Versioning 2.0.0 in which v0.x means that there could be backward-incompatible changes for every release. However, Helmfile has been very conservative about breaking changes, and we had no breaking change for a year or so before start thinking about v1.
>
> That said, you can expect Helmfile v1 to be backward-compatible as much as it was in v0.x.
## The changes in 1.0
1. [Forbid the use of `environments` and `releases` within a single helmfile.yaml.gotmpl part](#forbid-the-use-of-environments-and-releases-within-a-single-helmfileyamlgotmpl-part)
@ -11,6 +27,8 @@ Note that every breaking change should have an easy alternative way to achieve t
3. [Remove the `--args` flag from the `helmfile` command](#remove-the---args-flag-from-the-helmfile-command)
4. [Remove `HELMFILE_SKIP_INSECURE_TEMPLATE_FUNCTIONS` in favor of `HELMFILE_DISABLE_INSECURE_FEATURES`](#remove-helmfile_skip_insecure_template_functions-in-favor-of-helmfile_disable_insecure_features)
5. [The long deprecated `charts.yaml` has been finally removed](#the-long-deprecated-chartsyaml-has-been-finally-removed)
7. [Remove charts and delete sub-commands](#remove-charts-and-delete-subcommands)
### Forbid the use of `environments` and `releases` within a single helmfile.yaml.gotmpl part
@ -75,13 +93,27 @@ Note that every breaking change should have an easy alternative way to achieve t
### Remove `HELMFILE_SKIP_INSECURE_TEMPLATE_FUNCTIONS` in favor of `HELMFILE_DISABLE_INSECURE_FEATURES`
- This option didn't make much sense in practical. Generally, you'd want to disable all the insecure features altogether to make your deployment secure, or not disable any features. Disabling all is already possible via `HELMFILE_DISABLE_INSECURE_FEATURES `. In addition, `HELMFILE_SKIP_INSECURE_TEMPLATE_FUNCTIONS` literally made every insecure template function to silently skipped without any error or warning, which made debugging unnecessarily hard when the user accidentally used an insecure function.
- This option didn't make much sense in practice. Generally, you'd want to disable all the insecure features altogether to make your deployment secure, or not disable any features. Disabling all is already possible via `HELMFILE_DISABLE_INSECURE_FEATURES `. In addition, `HELMFILE_SKIP_INSECURE_TEMPLATE_FUNCTIONS` literally made every insecure template function to silently skipped without any error or warning, which made debugging unnecessarily hard when the user accidentally used an insecure function.
- See https://github.com/helmfile/helmfile/pull/564 for more context.
### The long deprecated `charts.yaml` has been finally removed
Helmfile used to load `helmfile.yaml` or `charts.yaml` when you omitted the `-f` flag. `charts.yaml` has been deprecated for a long time but never been removed. We take v1 as a chance to finally remove it.
### List experimental features
We have some experimental features that are not stable yet. We should list them in a list and mark them as experimental.
In Helmfile v1.x, all features should be backward-compatible within v1.x as we follow semver. We can't fix features in a backward incompatible way by default. To do so, we need a list of experimental features and say "anything in the experimentals can be modified backward-incompatible ways", and include features that are consireded experimental into the list beforehand.
Why now?
In Helmfile v0.x, all features considered experimental as we follow semver. However, we "ended up" preserving backward-compatibility within v0 and between v0 and v1 "by chance". This doesn't mean anything
introduced in v0 is stable. For example, we might have some features implemented in a very later stage of v0 that are not stable yet. We should mark them as experimental, or we can't fix them in a backward-incompatible way in v1.x. That's why we need to list experimental features now.
### remove-charts-and-delete-subcommands
Now we remove `helmfile charts` and `helmfile delete` subcommands. you can use `helmfile destroy` and `helmfile sync` instead.
## After 1.0
We won't add any backward-incompatible changes while in 1.x, as long as it's inevitable to fix unseen important bug(s).
The `isFile` function allows you to check if a file exists. On failure, the template rendering will fail with an error message.
```yaml
{{ if isFile "./myfile" }}
```
#### `isDir`
The `isDir` function allows you to check if a directory exists. On failure, the template rendering will fail with an error message.
```yaml
{{ if isDir "./mydirectory" }}
```
#### `readFile`
The `readFile` function allows you to read a file and return its content as the function output. On failure, the template rendering will fail with an error message.
@ -86,14 +100,14 @@ The `setValueAtPath` function allows you to set a value at a path. When has fail
```
#### `get`
The `get` function allows you to get a value at a path. when defaultValue not set. It will return nil. When has failed, the template rendering will fail with an error message.
The `get` function allows you to get a value at a path. you can set a default value when the path is not found. When has failed, the template rendering will fail with an error message.
```yaml
{{ $Getvalue := $value | get "path.key" "defaultValue" }}
```
#### `getOrNil`
The `getOrNil` function allows you to get a value at a path. when defaultValue not set. It will return nil. When has failed, the template rendering will fail with an error message.
The `getOrNil` function allows you to get a value at a path. it will return nil when the value of path is not found. When has failed, the template rendering will fail with an error message.
The 'include' function allows including and rendering nested templates. The function returns the created template or an error if any occurred. It will load functions from `_*.tpl` files in the directory where the helmfile.yaml is located.
For nested helmfile.yaml files, it will load `_*.tpl` files in the directory where each nested helmfile.yaml is located. example: [include](https://github.com/helmfile/helmfile/tree/main/test/integration/test-cases/include-template-func/input)
@ -153,7 +155,7 @@ Thus we added a new way for inheritance, which uses the `inherit` field we intro
See [issue helmfile/helmfile#435](https://github.com/helmfile/helmfile/issues/435#issuecomment-1362177510) for more context.
You might also find [issue roboll/helmfile#428](https://github.com/roboll/helmfile/issues/428) useful for more context on how we originally designed the relase template and what it's supposed to solve.
You might also find [issue roboll/helmfile#428](https://github.com/roboll/helmfile/issues/428) useful for more context on how we originally designed the release template and what it's supposed to solve.
return[]string{},fmt.Errorf("no state file found. It must be named %s/*.{yaml,yml,yaml.gotmpl,yml.gotmpl}, %s, or %s, otherwise specified with the --file flag",DefaultHelmfileDirectory,DefaultHelmfile,DefaultGotmplHelmfile)
return[]string{},fmt.Errorf("no state file found. It must be named %s/*.{yaml,yml,yaml.gotmpl,yml.gotmpl}, %s, or %s, otherwise specified with the --file flag or %s environment variable",DefaultHelmfileDirectory,DefaultHelmfile,DefaultGotmplHelmfile,envvar.FilePath)
error:`in ./helmfile.yaml: release "foo" depends on "bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`,
error:`in ./helmfile.yaml: release "bar" depends on "foo" which does not match the selectors. Please add a selector like "--selector name=foo", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`,
// as we check for log output, set concurrency to 1 to avoid non-deterministic test result
concurrency:1,
error:`in ./helmfile.yaml: release "default/external-secrets" depends on "kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`,
error:`in ./helmfile.yaml.gotmpl: release "default/external-secrets" depends on "kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`,
},
{
// see https://github.com/roboll/helmfile/issues/919#issuecomment-549831747
name:"upgrades with bad selector",
loc:location(),
files:map[string]string{
"/path/to/helmfile.yaml":`
"/path/to/helmfile.yaml.gotmpl":`
{{$mark:="a"}}
releases:
@ -816,72 +750,6 @@ releases:
error:"err: no releases found that matches specified selector(app=test_non_existent) and environment(default), in any helmfile",
// as we check for log output, set concurrency to 1 to avoid non-deterministic test result
error:`in ./helmfile.yaml: release(s) "foo" depend(s) on an undefined release "bar". Perhaps you made a typo in "needs" or forgot defining a release named "bar" with appropriate "namespace" and "kubeContext"?`,
error:`in ./helmfile.yaml: release "default//foo" depends on "default//bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`,
error:`in ./helmfile.yaml: release "default//bar" depends on "default//foo" which does not match the selectors. Please add a selector like "--selector name=foo", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`,
// as we check for log output, set concurrency to 1 to avoid non-deterministic test result
concurrency:1,
error:`in ./helmfile.yaml: release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`,
error:`in ./helmfile.yaml.gotmpl: release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`,
},
{
// see https://github.com/roboll/helmfile/issues/919#issuecomment-549831747
name:"upgrades with bad selector",
loc:location(),
files:map[string]string{
"/path/to/helmfile.yaml":`
"/path/to/helmfile.yaml.gotmpl":`
{{$mark:="a"}}
releases:
@ -1087,72 +1077,6 @@ releases:
error:"err: no releases found that matches specified selector(app=test_non_existent) and environment(default), in any helmfile",
// as we check for log output, set concurrency to 1 to avoid non-deterministic test result
error:`in ./helmfile.yaml: release "default//foo" depends on "default//bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`,
error:`in ./helmfile.yaml: release(s) "default//foo" depend(s) on an undefined release "default//bar". Perhaps you made a typo in "needs" or forgot defining a release named "bar" with appropriate "namespace" and "kubeContext"?`,
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
0 release(s) matching app=test_non_existent found in helmfile.yaml
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
2 release(s) matching app=test found in helmfile.yaml
err: release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
2 release(s) matching app=test found in helmfile.yaml
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
1 release(s) matching name=test2 found in helmfile.yaml
err: release "default//test2" depends on "default/kube-system/disabled" which does not match the selectors. Please add a selector like "--selector name=disabled", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
1 release(s) matching name=test3 found in helmfile.yaml
err: release "default//test2" depends on "default/kube-system/disabled" which does not match the selectors. Please add a selector like "--selector name=disabled", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
1 release(s) matching name=test2 found in helmfile.yaml
processing 2 groups of releases in this order:
@ -111,6 +11,7 @@ GROUP RELEASES
processing releases in group 1/2: default/kube-system/disabled
processing releases in group 2/2: default//test2
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
1 release(s) matching name=test3 found in helmfile.yaml
processing 3 groups of releases in this order:
@ -113,6 +13,7 @@ GROUP RELEASES
processing releases in group 1/3: default/kube-system/disabled
processing releases in group 2/3: default//test2
processing releases in group 3/3: default//test3
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
2 release(s) matching name=test2 found in helmfile.yaml
err: release "default//test2" depends on "default/kube-system/disabled" which does not match the selectors. Please add a selector like "--selector name=disabled", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
3 release(s) matching name=test3 found in helmfile.yaml
err: release "default//test2" depends on "default/kube-system/disabled" which does not match the selectors. Please add a selector like "--selector name=disabled", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
1 release(s) matching name=test2 found in helmfile.yaml
processing 2 groups of releases in this order:
@ -111,6 +11,7 @@ GROUP RELEASES
processing releases in group 1/2: default/kube-system/disabled
processing releases in group 2/2: default//test2
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
1 release(s) matching name=test3 found in helmfile.yaml
processing 3 groups of releases in this order:
@ -113,6 +13,7 @@ GROUP RELEASES
processing releases in group 1/3: default/kube-system/disabled
processing releases in group 2/3: default//test2
processing releases in group 3/3: default//test3
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
2 release(s) matching app=test found in helmfile.yaml
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
1 release(s) matching name=test3 found in helmfile.yaml
processing 3 groups of releases in this order:
@ -113,6 +13,7 @@ GROUP RELEASES
processing releases in group 1/3: default/kube-system/disabled
processing releases in group 2/3: default//test2
processing releases in group 3/3: default//test3
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
2 release(s) matching app=test found in helmfile.yaml
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: logging
3: chart: incubator/raw
4: namespace: kube-system
5:
6: - name: kubernetes-external-secrets
7: chart: incubator/raw
8: namespace: kube-system
9: needs:
10: - kube-system/logging
11:
12: - name: external-secrets
13: chart: incubator/raw
14: namespace: default
15: labels:
16: app: test
17: needs:
18: - kube-system/kubernetes-external-secrets
19:
20: - name: my-release
21: chart: incubator/raw
22: namespace: default
23: labels:
24: app: test
25: needs:
26: - default/external-secrets
27:
28:
29: # Disabled releases are treated as missing
30: - name: disabled
31: chart: incubator/raw
32: namespace: kube-system
33: installed: false
34:
35: - name: test2
36: chart: incubator/raw
37: needs:
38: - kube-system/disabled
39:
40: - name: test3
41: chart: incubator/raw
42: needs:
43: - test2
44:
merged environment: &{default map[] map[]}
WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs
2 release(s) matching app=test found in helmfile.yaml
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: bar
3: chart: mychart2
4: installed: false
5: - name: foo
6: chart: mychart1
7: needs:
8: - bar
9:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: bar
3: chart: mychart2
4: installed: false
5: - name: foo
6: chart: mychart1
7: needs:
8: - bar
9:
merged environment: &{default map[] map[]}
WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs
2 release(s) found in helmfile.yaml
err: release "default//foo" depends on "default//bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: foo
3: chart: mychart1
4: installed: false
5: - name: bar
6: chart: mychart2
7: needs:
8: - foo
9:
first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
0:
1: releases:
2: - name: foo
3: chart: mychart1
4: installed: false
5: - name: bar
6: chart: mychart2
7: needs:
8: - foo
9:
merged environment: &{default map[] map[]}
WARNING: release bar needs foo, but foo is not installed due to installed: false. Either mark foo as installed or remove foo from bar's needs
2 release(s) found in helmfile.yaml
err: release "default//bar" depends on "default//foo" which does not match the selectors. Please add a selector like "--selector name=foo", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies
Some files were not shown because too many files have changed in this diff
Show More