Choose how workspace data is persisted
Choose a storage strategy that controls whether workspace data persists after a restart. The selected storage strategy applies 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.
-
An active
kubectlsession with administrative permissions to the destination Kubernetes cluster. See Overview of kubectl.
-
Set the
pvcStrategyfield in the Che Cluster Custom Resource toper-user,per-workspaceorephemeral.
|
spec:
devEnvironments:
storage:
pvc:
pvcStrategy: 'per-user' (1)
| 1 | The available storage strategies are per-user, per-workspace and ephemeral. |