gitpod-io / gitpod-io/gitpod

installer: add a test to ensure that CSI is working as expected prior to installing Gitpod

Open
#10,614 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta: never-stale team: workspace
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

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 PVC csi-test-pvc, and write some data to the PVC csi-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 PVC csi-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 PVC csi-test-pvc.
      kubectl delete pvc csi-test-pvc
      kubectl delete pod csi-test-pod
      
    • Create another Pod csi-test-pod-restore and PVC csi-test-pvc-restore with data source as VolumeSnapshot csi-test-vs, and check the PVC csi-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
      
  • Add CSI driver requirement to the Notion's Product Compatibility Matrix

Describe alternatives you've considered

N/A

Additional context

#10201
#7901

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the installer’s preflight checks and review the related CSI requirements in issues #10201 and #7901. The work is complete when the checks cover storage and snapshot class deletion policies, snapshot backup and restore with the described resources, and the CSI driver requirement is added to the Product Compatibility Matrix.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.