-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
vSphere Server Info
- vSphere version: 7.0.3
Rancher Server Setup
- Rancher version: 2.7.3
Information about the Cluster
- Kubernetes version: 1.25.7 RKE2
Describe the bug
RKE2 has added the snapshot controllers and vSphere CSI supports VolumeSnapshots. In fact, this chart added a feature flag to add support here however it seems like it was forgotten that the CSI Snapshotter sidecar is required, as per VMware's installation instructions: https://raw.githubusercontent.com/kubernetes-sigs/vsphere-csi-driver/v2.4.0/manifests/vanilla/deploy-csi-snapshot-components.sh
Notice they apply the following patch:
# Update the vSphere CSI driver to add the snapshot side car.
tmpdir=$(mktemp -d)
echo "creating patch file in tmpdir ${tmpdir}"
cat <<EOF >> "${tmpdir}"/patch.yaml
spec:
template:
spec:
containers:
- name: csi-snapshotter
image: 'k8s.gcr.io/sig-storage/csi-snapshotter:${release}'
args:
- '--v=4'
- '--timeout=300s'
- '--csi-address=\$(ADDRESS)'
- '--leader-election'
env:
- name: ADDRESS
value: /csi/csi.sock
volumeMounts:
- mountPath: /csi
name: socket-dir
EOF
echo -e "Patching vSphere CSI driver.."
kubectl patch deployment vsphere-csi-controller -n vmware-system-csi --patch "$(cat "${tmpdir}"/patch.yaml)"
echo -e "✅ Successfully patched vSphere CSI driver, please wait till deployment is updated.."
echo -e "\n✅ Successfully deployed all components for CSI Snapshot feature.\n"
To Reproduce
Create a VolumeSnapshotDriver and a VolumeSnapshot with blockSnapshots
enabled. You will notice that the snapshot will never complete.
Expected Result
The snapshot should complete and the CSI Snapshotter should be added as a sidecar
SURE-7177