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.yamlkubectl delete spinapp.core.spinoperator.dev --allUninstall any existing SpinAppExecutors.
kubectl delete spinappexecutor.core.spinoperator.dev --allUninstall 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-operatorUninstall the old CRDs.
kubectl delete crd spinapps.core.spinoperator.dev kubectl delete crd spinappexecutors.core.spinoperator.devModify your SpinApps to use the new
apiVersion. Now you’ll need to modify theapiVersionin your SpinApps, replacingcore.spinoperator.dev/v1alpha1withcore.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.yamlin step 1. If you did this then you need to replace theapiVersionin thespinapps.yamlfile. 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.yamlInstall the new CRDs.
kubectl apply -f https://github.com/spinframework/spin-operator/releases/download/v0.4.0/spin-operator.crds.yamlRe-install the SpinAppExecutor.
kubectl apply -f https://github.com/spinframework/spin-operator/releases/download/v0.4.0/spin-operator.shim-executor.yamlIf 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-operatorRe-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.yamlUpgrade your
spin kubeplugin. If you’re using thespin kubeplugin 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.