Upgrade Using Helm
This section describes how to upgrade Huawei CSI.

- Some CSI 2.x versions are unavailable now. If the upgrade fails, CSI may fail to be rolled back to a version which is unavailable now.
- During the upgrade or rollback, you cannot use Huawei CSI to create new resources or mount or unmount an existing PVC.
- During the upgrade or rollback, do not uninstall the snapshot-dependent component service.
- During the upgrade or rollback, the existing resources such as PVCs, snapshots, and Pods will run properly and will not affect your service access.
1 - Upgrading from 2.x or 3.x to 4.x
Backing Up Storage Backend Configurations
If you have evaluated the risks mentioned in the preceding notice and need to upgrade CSI from 2.x or 3.x to 4.11.0, perform the following steps to back up storage backend configurations:
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Run the following command to back up the backend information to the configmap.json file. For the OpenShift platform, replace kubectl with oc.
kubectl get cm huawei-csi-configmap -n huawei-csi -o json > configmap.json
Upgrading Huawei CSI
Perform the upgrade according to the procedure described in
Upgrading Huawei CSI
.
Configuring the Storage Backend
Configure the storage backend based on the backend information backed up in
Backing Up Storage Backend Configurations
according to
Storage Backend Management
. The command for configuring the storage backend based on the backup backend information is as follows:
oceanctl create backend -f configmap.json -i json -n huawei-csi
2 - Upgrading Huawei CSI on Kubernetes, OpenShift, and Tanzu
Prerequisites
- Huawei CSI of an earlier version is installed using Helm.
- A Huawei CSI image of a new version has been created and uploaded to the image repository or imported to all nodes by following the instructions provided in
Uploading a Huawei CSI Image
.
Upgrading Huawei CSI
If CSI of an earlier version is deployed using Helm, perform the following steps to upgrade Huawei CSI.
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Copy the CSI component package of the target version to any directory on the master node.
Go to the helm/esdk working directory. For the directory path, see
Table 1
.
Run the kubectl apply -f ./crds/backend/ command to update the storage backend CRD.
kubectl apply -f ./crds/backend/
(Optional) Check snapshot-dependent components by following the instructions provided in
Checking Volume Snapshot-Dependent Components
. After confirming that the components are correct, run the following command to update the snapshot CRD. If controller.snapshot.enabled is set to false or the Kubernetes version is earlier than v1.20, you can skip this step. For details, see
Table 2
.
kubectl apply -f ./crds/snapshot-crds/ --validate=false
Run the following command to obtain the original service configuration file. helm-huawei-csi indicates the Helm chart name specified during the installation of the earlier version, and huawei-csi indicates the Helm chart namespace specified during the installation of the earlier version.
helm get values helm-huawei-csi -n huawei-csi -a > ./update-values.yaml
Run the vi update-values.yaml command to open the file obtained in
6
, modify the images configuration items, and update the image to the latest version. For details about the parameters to be modified, see
Table 1
.
Table 1 images configuration items
Container Name | Description | K8s Version Requirements | New Value |
|---|
storage-backend-controller | huawei-csi image. | v1.16+ | storage-backend-controller:4.11.0 |
storage-backend-sidecar | Image used by Huawei backends to manage storageBackendContent resources. | v1.16+ | storage-backend-sidecar:4.11.0 |
huawei-csi-driver | Image used by Huawei backends to manage storageBackendClaim resources. | v1.16+ | huawei-csi:4.11.0 |
huawei-csi-extender | huawei-csi-extender image. | v1.16+ | huawei-csi-extender:4.11.0 |
images.sidecar.livenessProbe | livenessprobe sidecar image. | v1.16+ | registry.k8s.io/sig-storage/livenessprobe:v2.15.0 |
images.sidecar.resizer | csi-resizer sidecar image. | v1.16+ | registry.k8s.io/sig-storage/csi-resizer:v1.13.2 |
images.sidecar.registrar | csi-node-driver-registrar sidecar image. | v1.16+ | registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0 |
images.sidecar.snapshotter
| csi-snapshotter sidecar image.
| v1.25+ | registry.k8s.io/sig-storage/csi-snapshotter:v8.2.0 |
v1.20-v1.24 | registry.k8s.io/sig-storage/csi-snapshotter:v6.3.0 |
images.sidecar.snapshotController
| snapshot-controller sidecar image.
| v1.25+ | registry.k8s.io/sig-storage/snapshot-controller:v8.2.0 |
v1.20-v1.24 | registry.k8s.io/sig-storage/snapshot-controller:v6.3.0 |
images.sidecar.provisioner
| csi-provisioner sidecar image. | v1.20+ | registry.k8s.io/sig-storage/csi-provisioner:v5.2.0 |
v1.17-v1.19 | registry.k8s.io/sig-storage/csi-provisioner:v3.0.0 |
v1.16.x | quay.io/k8scsi/csi-provisioner:v1.4.0 |
images.sidecar.attacher
| csi-attacher sidecar image. | v1.17+ | registry.k8s.io/sig-storage/csi-attacher:v4.8.0 |
v.1.16.x | quay.io/k8scsi/csi-attacher:v1.2.1 |
(Optional) If you need to update configuration items or add configuration information during the upgrade, modify the configuration information in the update-values.yaml file by referring to
Parameters in the values.yaml File of Helm
.

During the upgrade, if the update-values.yaml and values.yaml configuration files contain the same configuration item, the configuration in the update-values.yaml file takes effect preferentially.
Run the following command to upgrade Huawei CSI. In the following command, helm-huawei-csi indicates the specified Helm chart name, huawei-csi indicates the specified Helm chart namespace, and update-values.yaml indicates the file obtained in
6
.
helm upgrade helm-huawei-csi ./ -n huawei-csi -f ./values.yaml -f ./update-values.yaml
After the huawei-csi service is deployed, run the following command to check whether the service is started.
kubectl get pod -n huawei-csi
The following is an example of the command output. If the Pod status is Running, the service is started successfully.
NAME READY STATUS RESTARTS AGE
huawei-csi-controller-6dfcc4b79f-9vjtq 9/9 Running 0 24m
huawei-csi-controller-6dfcc4b79f-csphc 9/9 Running 0 24m
huawei-csi-node-g6f4k 3/3 Running 0 20m
huawei-csi-node-tqs87 3/3 Running 0 20m
3 - Upgrading Huawei CSI on CCE or CCE Agile
Prerequisites
You have downloaded the CSI software package of a new version.
Procedure
- Uninstall CSI. For details, see
Uninstalling Huawei CSI on CCE or CCE Agile
.
- Install CSI of the new version. For details, see
Installing Huawei CSI on the CCE or CCE Agile Platform
.