Configuring storage classes

To configure Che to use a configured infrastructure storage, install Che using storage classes. This is especially useful when you want to bind a persistent volume provided by a non-default provisioner.

Che has one component that requires persistent volumes to store data:

  • A Che workspace. Che workspaces store source code using volumes, for example /projects volume.

Che workspaces source code is stored in the persistent volume only if a workspace is not ephemeral.

Persistent volume claims facts:

  • Che does not create persistent volumes in the infrastructure.

  • Che uses persistent volume claims (PVC) to mount persistent volumes.

  • The Dev Workspace operator creates persistent volume claims.

    Define a storage class name in the Che configuration to use the storage classes feature in the Che PVC.


Use CheCluster Custom Resource definition to define storage classes:

  1. Define storage class names: configure the CheCluster Custom Resource, and install Che. See Using chectl to configure the CheCluster Custom Resource during installation.

            claimSize: <claim_size> (1)
            storageClass: <storage_class_name> (2)
            claimSize: <claim_size> (1)
            storageClass: <storage_class_name> (2)
          pvcStrategy: <pvc_strategy> (3)
    1 Persistent Volume Claim size.
    2 Storage class for the Persistent Volume Claim. When omitted or left blank, a default storage class is used.
    3 Persistent volume claim strategy. The supported strategies are: per-user (all workspaces Persistent Volume Claims in one volume), per-workspace (each workspace is given its own individual Persistent Volume Claim) and ephemeral (non-persistent storage where local changes will be lost when the workspace is stopped.)