You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Helm plugin enables users to migrate values across chart versions, accounting for changes in the values.yaml schema.
18
+
19
+
> **_NOTE:_** The intended usage of this plugin is that it does not apply any changes to the release on its own. It simply outputs the values to override, which are meant to be used with `helm upgrade --reset-then-reuse-values`.
20
+
>
21
+
> See [output values](#optional-output-the-migration-to-a-file) section for an example on how to apply the migration to a release
22
+
23
+
### Step 1: Define Migration Files
24
+
Start by defining migration files within your Helm chart. These files should be placed under the `value-migrations/` directory, relative to your base chart directory. You can customize the migration directory location by using the `--migration-dir` flag.
25
+
26
+
#### Migration File Naming Convention
27
+
Each migration file should follow the naming format:
28
+
`to-v{VERSION_TO}.yaml`, where **VERSION_TO** is the target chart version. The plugin will use this file to define the transformation between the previous version and the specified version.
29
+
30
+
#### Migration File Structure
31
+
These migration files are written in YAML, using Go templating for transforming and mapping values from the old schema to the new one. See this [example](pkg/test-charts/v2/value-migrations/to-v2.yaml) from the integration test.
32
+
33
+
### Step 2: Run the Migration
34
+
To migrate your Helm release to a new chart version, use the following command:
35
+
```
36
+
helm migrate-values [RELEASE] [CHART] [flags]
37
+
```
38
+
39
+
-**RELEASE**: The name of the Helm release you're migrating.
40
+
-**CHART**: The chart you're migrating to, which can be a local chart (specified by file path) or a remote chart (using the `oci://` prefix).
You can also specify the `--output-file` flag to save the migrated values YAML to a file, allowing you to inspect or use it in subsequent Helm operations:
52
+
53
+
You can then use this file in a helm upgrade command to complete the migration:
We adhere to [Semantic Versioning](https://semver.org/) and utilize [@changesets/cli](https://github.com/changesets/changesets) to manage release notes and versioning.
0 commit comments