Configuring the storage strategy

Che can be configured to provide persistent or non-persistent storage to workspaces by selecting a storage strategy. The selected storage strategy will be applied to all newly created workspaces by default. Users can opt for a non-default storage strategy for their workspace in their devfile or through the URL parameter.

Available storage strategies:

  • per-user: Use a single PVC for all workspaces created by a user.

  • per-workspace: Each workspace is given its own PVC.

  • ephemeral: Non-persistent storage; any local changes will be lost when the workspace is stopped.

The default storage strategy used in Che is per-user.

Procedure
  1. Set the pvcStrategy field in the Che Cluster Custom Resource to per-user, per-workspace or ephemeral.

spec:
  devEnvironments:
    storage:
      pvc:
        pvcStrategy: 'per-user' (1)
1 The available storage strategies are per-user, per-workspace and ephemeral.