Upgrade from 1.x to 2.x
This guide describes the steps to perform an upgrade of the component from version 1.x to 2.x.
Before upgrading to version 2.x, please ensure that your Kubernetes cluster is running the version 1.17 or later. |
Requirements
-
commodore
-
kubectl
-
shell
Step-by-step guide
The essential part of the upgrade is the renaming of the provisioner name from ch.cloudscale.csi
to csi.cloudscale.ch
.
This implies that all PersistentVolumes
require a changed annotation and all StorageClasses
need to be recreated with the new provisioner name.
The upgrade itself doesn’t affect the data path, so applications shouldn’t experience IO interrupts during the upgrade. However, during the upgrade, volume provisioning and volume changes might not work for short periods of time, so it’s strongly recommended to perform the upgrade during off hours. To minimize the visible impact of the upgrade, all steps should be done together.
-
Change the provisioner annotation for all volumes from
ch.cloudscale.csi
tocsi.cloudscale.ch
:wget https://raw.githubusercontent.com/cloudscale-ch/csi-cloudscale/master/scripts/fix-annotation.sh chmod +x fix-annotation.sh ./fix-annotation.sh migrate rm fix-annotation.sh
-
Update the component:
parameters: components: csi-cloudscale: version: v2.1.0
-
Compile and push the catalog
-
Delete existing csi-cloudscale storage classes
oc delete sc bulk bulk-encrypted ssd ssd-encrypted
The storageclasses are part of the component and will be recreated using the new parameters. Kubernetes doesn’t allow to change the provisioner after creating the object, so the storageclass objects have to be recreated.