diff --git a/docs/advanced-features.md b/docs/advanced-features.md index dba1123f..5c4c09c7 100644 --- a/docs/advanced-features.md +++ b/docs/advanced-features.md @@ -4,6 +4,7 @@ - [Deploy Kustomization with Helmfile](#deploy-kustomizations-with-helmfile) - [Adhoc Kustomization of Helm Charts](#adhoc-kustomization-of-helm-charts) - [Adding dependencies without forking the chart](#adding-dependencies-without-forking-the-chart) +- [Appending Values to Lists](#appending-values-to-lists) ### Import Configuration Parameters into Helmfile @@ -316,6 +317,39 @@ releases: version: 1.5 ``` +### Appending Values to Lists + +Helmfile supports a special syntax using `key+` to append values to lists instead of replacing them. This is particularly useful when you want to add items to existing lists in your values files without overriding the entire list. + +#### Basic Usage + +When you use a key ending with `+` in your values files, Helmfile will append the values to the existing list rather than replacing it: + +```yaml +# values.yaml +myListValues: + - first + - second +... # Rest of your values +``` + +```yaml +# values-override.yaml +myListValues+: # This will append to the existing list instead of replacing it + - third +... +``` + +After processing, the final merged values will be: + +```yaml +myListValues: + - first + - second + - third +... +``` + ### Lockfile per environment In some cases it can be handy for CI/CD pipelines to be able to roll out updates gradually for environments, such as staging and production while using the same