Skip to content

Commit 0b10e26

Browse files
authored
Merge pull request #257 from calebschoepp/this-is-the-real-one
Add doc to migrate from v0.3.0 to v0.4.0
2 parents 383299a + c60f060 commit 0b10e26

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Upgrading to v0.4.0
3+
description: Instructions on how to navigate the breaking changes v0.4.0 introduces.
4+
categories: [Spin Operator]
5+
tags: []
6+
---
7+
8+
Spin Operator v0.4.0 introduces a breaking API change. The SpinApp and SpinAppExecutor are moving from the `spinoperator.dev` to `spinkube.dev` domains. This is a breaking change and therefore requires a re-install of the Spin Operator when upgrading to v0.4.0.
9+
10+
## Migration steps
11+
12+
1. Uninstall any existing SpinApps.
13+
14+
> Note: Back em' up! TODO
15+
>
16+
> ```sh
17+
> kubectl get spinapps.core.spinoperator.dev -o yaml > spinapps.yaml
18+
> ```
19+
20+
```sh
21+
kubectl delete spinapp.core.spinoperator.dev --all
22+
```
23+
24+
2. Uninstall any existing SpinAppExecutors.
25+
```sh
26+
kubectl delete spinappexecutor.core.spinoperator.dev --all
27+
```
28+
3. Uninstall the old Spin Operator.
29+
> Note: If you used a different release name or namespace when installing the Spin Operator you'll have to adjust the command accordingly. Alternatively, if you used something other than Helm to install the Spin Operator, you'll need to uninstall it following whatever approach you used to install it.
30+
```sh
31+
helm uninstall spin-operator --namespace spin-operator
32+
```
33+
4. Uninstall the old CRDs.
34+
```sh
35+
kubectl delete crd spinapps.core.spinoperator.dev
36+
kubectl delete crd spinappexecutors.core.spinoperator.dev
37+
```
38+
5. Modify your SpinApps to use the new `apiVersion`.
39+
Now you'll need to modify the `apiVersion` in your SpinApps, replacing `core.spinoperator.dev/v1alpha1` with `core.spinkube.dev/v1alpha1`.
40+
> Note: If you don't have your SpinApps tracked in source code somewhere than you will have backed up the SpinApps in your cluster to a file named `spinapps.yaml` in step 1. If you did this then you need to replace the `apiVersion` in the `spinapps.yaml` file. Here's a command that can help with that:
41+
```sh
42+
sed 's|apiVersion: core.spinoperator.dev/v1alpha1|apiVersion: core.spinkube.dev/v1alpha1|g' spinapps.yaml > modified-spinapps.yaml
43+
```
44+
6. Install the new CRDs.
45+
```sh
46+
kubectl apply -f https://github.com/spinkube/spin-operator/releases/download/v0.4.0/spin-operator.crds.yaml
47+
```
48+
7. Re-install the SpinAppExecutor.
49+
```sh
50+
kubectl apply -f https://github.com/spinkube/spin-operator/releases/download/v0.4.0/spin-operator.shim-executor.yaml
51+
```
52+
If you had other executors you'll need to install them too.
53+
8. Install the new Spin Operator.
54+
```sh
55+
# Install Spin Operator with Helm
56+
helm install spin-operator \
57+
--namespace spin-operator \
58+
--create-namespace \
59+
--version 0.4.0 \
60+
--wait \
61+
oci://ghcr.io/spinkube/charts/spin-operator
62+
```
63+
9. Re-apply your modified SpinApps.
64+
Follow whatever pattern you normally follow to get your SpinApps in the cluster e.g. Kubectl, Flux, Helm, etc.
65+
> Note: If you backed up your SpinApps in step 1, you can re-apply them using the command below:
66+
>
67+
> ```sh
68+
> kubectl apply -f modified-spinapps.yaml
69+
> ```
70+
10. Upgrade your `spin kube` plugin.
71+
If you're using the `spin kube` plugin you'll need to upgrade it to the new version so that the scaffolded apps are still valid.
72+
```sh
73+
spin plugins upgrade kube
74+
```

0 commit comments

Comments
 (0)