Open
Description
Is your feature request related to a problem? Please describe
Add a test to ensure that the CSI is working as expected prior to installing Gitpod
Describe the behaviour you'd like
Have a pre-installed/preflight test to ensure that the CSI is working as expected prior to installing Gitpod
The required CSI criteria are similar to #10201, here are the test criteria:
- Have a storage class with
Delete
policy? 🤔 - Have a volume snapshot class with
Delete
policy? 🤔 - Support CSI snapshot backup/restore without a problem.
- Create Pod
csi-test-pod
with PVCcsi-test-pvc
, and write some data to the PVCcsi-test-pvc
.--- apiVersion: v1 kind: Pod metadata: name: csi-test-pod spec: containers: - name: web-server image: nginx volumeMounts: - name: pvc mountPath: /var/lib/www/html volumes: - name: pvc persistentVolumeClaim: claimName: csi-test-pvc readOnly: false --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: csi-test-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi storageClassName: <name-from-config-storageClass>
- Create VolumeSnapshot
csi-test-vs
for the PVCcsi-test-pvc
, it can back up the snapshot success, and the VolumeSnapshotContent be created.--- # 1.17 <= K8s <= v1.19 # apiVersion: snapshot.storage.k8s.io/v1beta1 # K8s >= v1.20 apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: csi-test-vs spec: volumeSnapshotClassName: <name-from-config-snapshotClass> source: persistentVolumeClaimName: csi-test-pvc
- Delete Pod
csi-test-pod
and PVCcsi-test-pvc
.kubectl delete pvc csi-test-pvc kubectl delete pod csi-test-pod
- Create another Pod
csi-test-pod-restore
and PVCcsi-test-pvc-restore
with data source as VolumeSnapshotcsi-test-vs
, and check the PVCcsi-test-pvc-restore
with correct data content.--- apiVersion: v1 kind: Pod metadata: name: csi-test-pod-restore spec: containers: - name: web-server image: nginx volumeMounts: - name: pvc mountPath: /var/lib/www/html volumes: - name: pvc persistentVolumeClaim: claimName: csi-test-pvc-restore readOnly: false --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: csi-test-pvc-restore spec: storageClassName: <name-from-config-storageClass> dataSource: name: csi-test-vs kind: VolumeSnapshot apiGroup: snapshot.storage.k8s.io accessModes: - ReadWriteOnce resources: requests: storage: 1Gi
- Create Pod
- Add CSI driver requirement to the Notion's Product Compatibility Matrix
Describe alternatives you've considered
N/A