Skip to content

Commit 1399202

Browse files
committed
edits
1 parent bd3465d commit 1399202

File tree

1 file changed

+42
-37
lines changed

1 file changed

+42
-37
lines changed

docs/vendor/helm-v2-migrate.md

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This section describes how to migrate existing HelmChart v1 installations with `
3434

3535
To migrate existing installations from HelmChart v1 and `useHelmInstall: false` to HelmChart v2:
3636

37-
1. Create a new release containing your application files.
37+
1. Create a new release containing your application files:
3838

3939
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.
4040

@@ -45,6 +45,7 @@ To migrate existing installations from HelmChart v1 and `useHelmInstall: false`
4545
kind: Statefulset
4646
metadata:
4747
name: postgresql
48+
# Add the kots.io/keep annotation
4849
annotations:
4950
kots.io/keep: "true"
5051
```
@@ -55,7 +56,7 @@ To migrate existing installations from HelmChart v1 and `useHelmInstall: false`
5556
5657
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).
5758

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:
5960

6061
```yaml
6162
# HelmChart v1 beta2
@@ -82,11 +83,13 @@ To migrate existing installations from HelmChart v1 and `useHelmInstall: false`
8283

8384
1. In your development environment, access the Admin Console to upgrade to the second release.
8485

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**.
8689

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.
8891

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.
9093

9194
### Migrate From Standard Kubernetes Manifests
9295

@@ -98,58 +101,60 @@ To migrate applications that were previously packaged as standard Kubernetes man
98101

99102
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.
100103

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+
```
111114

112115
1. Save the release.
113116

114117
1. Create another new release:
115118

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).
117120

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).
119122

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:
121124

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+
```
132135

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.
134137

135138
1. Save the release.
136139

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:
140141

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.
142143

143-
1. Promote the second release to the same channel.
144+
1. In a development environment, install the first release.
144145

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.
146149

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_.
148151

149-
1. Promote the second release containing your application Helm chart to 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**.
150153

151154
1. Instruct customers to migrate by first upgrading to the release containing the standard manifests, then upgrading to the release packaged with Helm.
152155

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+
153158
## Support Customers on KOTS Versions Earlier Than v1.99.0 {#support-both-v1-v2}
154159

155160
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

Comments
 (0)