Upgrading to v0.4.0
Categories:
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.
Migration steps
Uninstall any existing SpinApps.
Note: Back em’ up! TODO
kubectl get spinapps.core.spinoperator.dev -o yaml > spinapps.yaml
kubectl delete spinapp.core.spinoperator.dev --all
Uninstall any existing SpinAppExecutors.
kubectl delete spinappexecutor.core.spinoperator.dev --all
Uninstall the old Spin Operator.
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.
helm uninstall spin-operator --namespace spin-operator
Uninstall the old CRDs.
kubectl delete crd spinapps.core.spinoperator.dev kubectl delete crd spinappexecutors.core.spinoperator.dev
Modify your SpinApps to use the new
apiVersion
. Now you’ll need to modify theapiVersion
in your SpinApps, replacingcore.spinoperator.dev/v1alpha1
withcore.spinkube.dev/v1alpha1
.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 theapiVersion
in thespinapps.yaml
file. Here’s a command that can help with that:sed 's|apiVersion: core.spinoperator.dev/v1alpha1|apiVersion: core.spinkube.dev/v1alpha1|g' spinapps.yaml > modified-spinapps.yaml
Install the new CRDs.
kubectl apply -f https://github.com/spinkube/spin-operator/releases/download/v0.4.0/spin-operator.crds.yaml
Re-install the SpinAppExecutor.
kubectl apply -f https://github.com/spinkube/spin-operator/releases/download/v0.4.0/spin-operator.shim-executor.yaml
If you had other executors you’ll need to install them too.
Install the new Spin Operator.
# Install Spin Operator with Helm helm install spin-operator \ --namespace spin-operator \ --create-namespace \ --version 0.4.0 \ --wait \ oci://ghcr.io/spinkube/charts/spin-operator
Re-apply your modified SpinApps. Follow whatever pattern you normally follow to get your SpinApps in the cluster e.g. Kubectl, Flux, Helm, etc.
Note: If you backed up your SpinApps in step 1, you can re-apply them using the command below:
kubectl apply -f modified-spinapps.yaml
Upgrade your
spin kube
plugin. If you’re using thespin kube
plugin you’ll need to upgrade it to the new version so that the scaffolded apps are still valid.spin plugins upgrade kube
Feedback
Was this page helpful?
Glad to hear it!
Sorry to hear that. Please tell us how we can improve.