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
Copy file name to clipboardExpand all lines: docs/vendor/helm-v2-migrate.md
+42-37Lines changed: 42 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ This section describes how to migrate existing HelmChart v1 installations with `
34
34
35
35
To migrate existing installations from HelmChart v1 and `useHelmInstall: false` to HelmChart v2:
36
36
37
-
1. Create a new release containing your application files.
37
+
1. Create a new release containing your application files:
38
38
39
39
1. In the release, for any resources defined in Kubernetes manifests or in your Helm `templates` that were previously installed with HelmChart v1 and `useHelmInstall: false`, add the `kots.io/keep` annotation. The `kots.io/keep` annotation prevents KOTS from uninstalling these resources when upgrading using the HelmChart v2 method.
40
40
@@ -45,6 +45,7 @@ To migrate existing installations from HelmChart v1 and `useHelmInstall: false`
45
45
kind: Statefulset
46
46
metadata:
47
47
name: postgresql
48
+
# Add the kots.io/keep annotation
48
49
annotations:
49
50
kots.io/keep: "true"
50
51
```
@@ -55,7 +56,7 @@ To migrate existing installations from HelmChart v1 and `useHelmInstall: false`
55
56
56
57
1. For each Helm chart in the release, configure the corresponding HelmChart custom resource to update `apiVersion` to `kots.io/v1beta2`, rewrite images, inject image pull secrets, and add backup labels. See [Configuring the HelmChart Custom Resource v2](helm-native-v2-using).
57
58
58
-
1. In the KOTS HelmChart v2 custom resource, under the `helmUpgradeFlags` field, add the `--take-ownership` flag:
59
+
1. In the HelmChart custom resource, under the `helmUpgradeFlags` field, add the `--take-ownership` flag:
59
60
60
61
```yaml
61
62
# HelmChart v1 beta2
@@ -82,11 +83,13 @@ To migrate existing installations from HelmChart v1 and `useHelmInstall: false`
82
83
83
84
1. In your development environment, access the Admin Console to upgrade to the second release.
84
85
85
-
1. When you are done testing, promote the first release to one or more of your customer-facing channels. Replicated recommends that you mark the release as required by enabling **Prevent this release from being skipped during upgrades**.
86
+
1. When you are done testing, promote the first release to one or more of your customer-facing channels. Replicated recommends that you mark the release as required by enabling **Prevent this release from being skipped during upgrades**. For more information about required releases, see [Properties](/vendor/releases-about#properties) in _About Channels and Releases_.
87
+
88
+
1. Promote the second release to the same customer-facing channel(s). Replicated recommends that you mark the release as required by enabling **Prevent this release from being skipped during upgrades**.
86
89
87
-
1. Promote the second release to the customer-facing channels. Replicated recommends that you mark the release as required by enabling **Prevent this release from being skipped during upgrades**.
90
+
1. Instruct customers to migrate by first upgrading to the release where the `kots.io.keep` annotation is applied to your resources, then upgrading to the release with HelmChart v2.
88
91
89
-
Your customers can follow the standard upgrade process in the Admin Console to update their instance to the new version.
92
+
1. (Recommended) In subsequent releases, remove the `helmUpgradeFlags` field (including the `--take-ownership` flag) from the HelmChart custom resource. This flag is only required during one upgrade to allow Helm to take ownership of your application resources.
90
93
91
94
### Migrate From Standard Kubernetes Manifests
92
95
@@ -98,58 +101,60 @@ To migrate applications that were previously packaged as standard Kubernetes man
98
101
99
102
1. For each of the application manifests in the release, add the `kots.io/keep` annotation. The `kots.io/keep` annotation prevents KOTS from uninstalling resources that were previously installed without Helm when upgrading using the HelmChart v2 method.
100
103
101
-
**Example:**
102
-
103
-
```yaml
104
-
apiVersion: apps/v1
105
-
kind: Statefulset
106
-
metadata:
107
-
name: postgresql
108
-
annotations:
109
-
kots.io/keep: "true"
110
-
```
104
+
**Example:**
105
+
106
+
```yaml
107
+
apiVersion: apps/v1
108
+
kind: Statefulset
109
+
metadata:
110
+
name: postgresql
111
+
annotations:
112
+
kots.io/keep: "true"
113
+
```
111
114
112
115
1. Save the release.
113
116
114
117
1. Create another new release:
115
118
116
-
1. In the release, add your application Helm chart or charts. Remove the application manifests for resources that were adopted into the Helm chart(s).
119
+
1. In the release, add your application Helm chart(s). Remove the application manifests for resources that were adopted into the Helm chart(s).
117
120
118
-
1. For each Helm chart in the new release, configure the corresponding HelmChart custom resource to update `apiVersion` to `kots.io/v1beta2`, rewrite images, inject image pull secrets, and add backup labels. See [Configuring the HelmChart Custom Resource v2](helm-native-v2-using).
121
+
1. For each Helm chart in the release, add a corresponding KOTS HelmChart custom resource with `apiVersion` set to `kots.io/v1beta2`. Configure the resource to rewrite images, inject image pull secrets, and add backup labels. See [Configuring the HelmChart Custom Resource v2](helm-native-v2-using).
119
122
120
-
1. In the `helmUpgradeFlags` field of the Embedded Cluster Config, add the `--take-ownership` flag, as shown below:
123
+
1. In the HelmChart custom resource, under the `helmUpgradeFlags` field, add the `--take-ownership` flag:
121
124
122
-
```yaml
123
-
# HelmChart v1 beta2
124
-
apiVersion: kots.io/v1beta2
125
-
kind: HelmChart
126
-
metadata:
127
-
name: samplechart
128
-
spec:
129
-
helmUpgradeFlags:
130
-
- --take-ownership
131
-
```
125
+
```yaml
126
+
# HelmChart v1 beta2
127
+
apiVersion: kots.io/v1beta2
128
+
kind: HelmChart
129
+
metadata:
130
+
name: samplechart
131
+
spec:
132
+
helmUpgradeFlags:
133
+
- --take-ownership
134
+
```
132
135
133
-
When the `--take-ownership` flag is enabled, Helm automatically takes ownership of resources that were previously deployed without Helm during upgrade.
136
+
When the `--take-ownership` upgrade flag is enabled, Helm automatically takes ownership of resources that were previously deployed without Helm.
134
137
135
138
1. Save the release.
136
139
137
-
1. Test the upgrade process:
138
-
139
-
1. Promote the first release to an internal-only channel that your team uses for testing.
140
+
1. Test the migration process:
140
141
141
-
1. In a development environment, install the release.
142
+
1. Promote the first release to an internal-only channel that your team uses for testing.
142
143
143
-
1. Promote the second release to the same channel.
144
+
1. In a development environment, install the first release.
144
145
145
-
1. In your development environment, upgrade to the second release to migrate the installation to HelmChart v2.
146
+
1. Promote the second release to the same channel.
147
+
148
+
1. In your development environment, access the Admin Console to upgrade to the second release. Upgrading to the second release migrates the installation to HelmChart v2.
146
149
147
-
1. After you are done testing the migration process, promote the first release containing your application manifests to one or more customer-facing channels. Mark the release as required by enabling **Prevent this release from being skipped during upgrades**.
150
+
1. After you are done testing the migration process, promote the first release containing your application manifests with the `kots.io/keep` annotation to one or more customer-facing channels. Replicated recommends that you mark the release as required by enabling **Prevent this release from being skipped during upgrades**. For more information about required releases, see [Properties](/vendor/releases-about#properties) in _About Channels and Releases_.
148
151
149
-
1. Promote the second release containing your application Helm chartto the same channels. Mark the release as required by enabling **Prevent this release from being skipped during upgrades**.
152
+
1. Promote the second release containing your Helm chart(s) and the HelmChart v2 custom resource(s) to the same channels. Replicated recommends that you mark the release as required by enabling **Prevent this release from being skipped during upgrades**.
150
153
151
154
1. Instruct customers to migrate by first upgrading to the release containing the standard manifests, then upgrading to the release packaged with Helm.
152
155
156
+
1. (Recommended) In subsequent releases, remove the `helmUpgradeFlags` field (including the `--take-ownership` flag) from the HelmChart custom resource. This flag is only required during one upgrade to allow Helm to take ownership of your application resources.
157
+
153
158
## Support Customers on KOTS Versions Earlier Than v1.99.0 {#support-both-v1-v2}
154
159
155
160
The HelmChart v2 installation method requires KOTS v1.99.0 or later. If you have existing customers that have not yet upgraded to KOTS v1.99.0 or later, Replicated recommends that you support both the HelmChart v2 and v1 installation methods from the same release until all installations are running KOTS v1.99.0 or later.
0 commit comments