From d55d8a77be22b185b5abd9dfbad0c2028ea9640a Mon Sep 17 00:00:00 2001 From: Andrew Obuchowicz Date: Tue, 23 May 2023 18:13:40 +0000 Subject: [PATCH] feat: add persistUserHome Che Cluster CR field Fix eclipse/che#22102 Signed-off-by: Andrew Obuchowicz --- api/v2/checluster_types.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/v2/checluster_types.go b/api/v2/checluster_types.go index ad10d7327..3f318193f 100644 --- a/api/v2/checluster_types.go +++ b/api/v2/checluster_types.go @@ -85,6 +85,10 @@ type CheClusterDevEnvironments struct { // +optional // +kubebuilder:default:={pvcStrategy: per-user} Storage WorkspaceStorage `json:"storage,omitempty"` + // PersistUserHome defines configuration options for persisting the + // user home directory in workspaces. + // +optional + PersistUserHome *PersistentHomeConfig `json:"persistUserHome,omitempty"` // Default plug-ins applied to DevWorkspaces. // +optional DefaultPlugins []WorkspaceDefaultPlugins `json:"defaultPlugins,omitempty"` @@ -437,6 +441,14 @@ type WorkspaceStorage struct { PvcStrategy string `json:"pvcStrategy,omitempty"` } +type PersistentHomeConfig struct { + // Determines whether the user home directory in workspaces should persist between + // workspace shutdown and startup. + // Must be used with the 'per-user' or 'per-workspace' PVC strategy in order to take effect. + // Disabled by default. + Enabled *bool `json:"enabled,omitempty"` +} + type WorkspaceDefaultPlugins struct { // The editor ID to specify default plug-ins for. Editor string `json:"editor,omitempty"`