Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for persistent $HOME directory #1097

Closed
AObuchow opened this issue May 8, 2023 · 0 comments · Fixed by #1105
Closed

Support for persistent $HOME directory #1097

AObuchow opened this issue May 8, 2023 · 0 comments · Fixed by #1105
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@AObuchow
Copy link
Collaborator

AObuchow commented May 8, 2023

Description

It would be nice to have the /home/user directory persist across workspace startup/shutdown. $HOME Persistence would use the PVC strategy assigned to the DevWorkspace:

  • When using the common/per-user PVC strategy, all workspaces would have their own unique home directory, that would be mounted to the common PVC under a different subpath
  • When using the per-workspace PVC strategy, the workspace's home directory would exist on the workspace PVC
  • When using the ephemeral PVC strategy, the workspace's home directory would not persist after the workspace is shutdown (no persistent storage)

I propose we add a new DWOC field config.workspace.persistentHomeUserDirectoryConfig:

config:
  workspace:
    persistentHomeUserDirectoryConfig:
      enabled: <bool>

Making a struct to hold the home directory config settings would allow us to add further configuration options in the future.
For example, if users end up requesting that workspaces should share their home directories (no sub-path) when using the common/per-user PVC strategy, we could add something like:

config:
  workspace:
    persistentHomeUserDirectoryConfig:
      enabled: <bool>
+     shareHomePerUser: <bool>

Additional context

Upstream Che Issue

@AObuchow AObuchow added the enhancement New feature or request label May 8, 2023
@AObuchow AObuchow self-assigned this May 8, 2023
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 15, 2023
Part of devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 15, 2023
…e strategies

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 15, 2023
Part of devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 15, 2023
…e strategies

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 15, 2023
Part of devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 15, 2023
…e strategies

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 15, 2023
Part of devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 15, 2023
…e strategies

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 19, 2023
Part of devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 19, 2023
…e strategies

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 30, 2023
Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 30, 2023
This commit allows the `/home/user/` directory in workspaces to  persist if  persistent storage is enabled
(through the use of the 'per-user' ('common') or 'per-workspace' storage class).

To enable this feature, modify the DWOC and set `config.workspace.persistUserHome.enabled` to `true`.

When enabled, a Devfile volume named `persistentHome` will be added to DevWorkspaces. All DevWorkspace container
components will mount the `persistentHome` volume at `/home/user/`. If a container component of a DevWorkspace already
mounts to `/home/user/`, the DWO-provisioned `persistentHome` volume will not be added to the DevWorkspace.

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 30, 2023
This commit allows the `/home/user/` directory in workspaces to  persist if  persistent storage is enabled
(through the use of the 'per-user' ('common') or 'per-workspace' storage class).

To enable this feature, modify the DWOC and set `config.workspace.persistUserHome.enabled` to `true`.

When enabled, a Devfile volume named `persistentHome` will be added to DevWorkspaces. All DevWorkspace container
components will mount the `persistentHome` volume at `/home/user/`. If a container component of a DevWorkspace already
mounts to `/home/user/`, the DWO-provisioned `persistentHome` volume will not be added to the DevWorkspace.

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 30, 2023
This commit allows the `/home/user/` directory in workspaces to  persist if  persistent storage is enabled
(through the use of the 'per-user' ('common') or 'per-workspace' storage class).

To enable this feature, modify the DWOC and set `config.workspace.persistUserHome.enabled` to `true`.

When enabled, a Devfile volume named `persistentHome` will be added to DevWorkspaces. All DevWorkspace container
components will mount the `persistentHome` volume at `/home/user/`. If a container component of a DevWorkspace already
mounts to `/home/user/`, the DWO-provisioned `persistentHome` volume will not be added to the DevWorkspace.

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 30, 2023
This commit allows the `/home/user/` directory in workspaces to  persist if  persistent storage is enabled
(through the use of the 'per-user' ('common') or 'per-workspace' storage class).

To enable this feature, modify the DWOC and set `config.workspace.persistUserHome.enabled` to `true`.

When enabled, a Devfile volume named `persistentHome` will be added to DevWorkspaces. All DevWorkspace container
components will mount the `persistentHome` volume at `/home/user/`. If a container component of a DevWorkspace already
mounts to `/home/user/`, the DWO-provisioned `persistentHome` volume will not be added to the DevWorkspace.

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 31, 2023
This commit allows the `/home/user/` directory in workspaces to  persist if  persistent storage is enabled
(through the use of the 'per-user' ('common') or 'per-workspace' storage class).

To enable this feature, modify the DWOC and set `config.workspace.persistUserHome.enabled` to `true`.

When enabled, a Devfile volume named `persistentHome` will be added to DevWorkspaces. All DevWorkspace container
components will mount the `persistentHome` volume at `/home/user/`. If a container component of a DevWorkspace already
mounts to `/home/user/`, the DWO-provisioned `persistentHome` volume will not be added to the DevWorkspace, and the
DevWorkspace will be given a warning condition.

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue May 31, 2023
This commit allows the `/home/user/` directory in workspaces to  persist if  persistent storage is enabled
(through the use of the 'per-user' ('common') or 'per-workspace' storage class).

To enable this feature, modify the DWOC and set `config.workspace.persistUserHome.enabled` to `true`.

When enabled, a Devfile volume named `persistentHome` will be added to DevWorkspaces. All DevWorkspace container
components will mount the `persistentHome` volume at `/home/user/`. If a container component of a DevWorkspace already
mounts to `/home/user/`, the DWO-provisioned `persistentHome` volume will not be added to the DevWorkspace, and the
DevWorkspace will be given a warning condition.

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Jun 8, 2023
This commit allows the `/home/user/` directory in workspaces to  persist if  persistent storage is enabled
(through the use of the 'per-user' ('common') or 'per-workspace' storage class).

To enable this feature, modify the DWOC and set `config.workspace.persistUserHome.enabled` to `true`.

When enabled, a Devfile volume named `persistentHome` will be added to DevWorkspaces. All DevWorkspace container
components will mount the `persistentHome` volume at `/home/user/`. If a container component of a DevWorkspace already
mounts to `/home/user/`, the DWO-provisioned `persistentHome` volume will not be added to the DevWorkspace, and the
DevWorkspace will be given a warning condition.

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Jun 9, 2023
This commit allows the `/home/user/` directory in workspaces to  persist if  persistent storage is enabled
(through the use of the 'per-user' ('common') or 'per-workspace' storage class).

To enable this feature, modify the DWOC and set `config.workspace.persistUserHome.enabled` to `true`.

When enabled, a Devfile volume named `persistentHome` will be added to DevWorkspaces. All DevWorkspace container
components will mount the `persistentHome` volume at `/home/user/`. If a container component of a DevWorkspace already
mounts to `/home/user/`, the DWO-provisioned `persistentHome` volume will not be added to the DevWorkspace.

Fix devfile#1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit that referenced this issue Jun 9, 2023
Part of #1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit that referenced this issue Jun 9, 2023
This commit allows the `/home/user/` directory in workspaces to  persist if  persistent storage is enabled
(through the use of the 'per-user' ('common') or 'per-workspace' storage class).

To enable this feature, modify the DWOC and set `config.workspace.persistUserHome.enabled` to `true`.

When enabled, a Devfile volume named `persistentHome` will be added to DevWorkspaces. All DevWorkspace container
components will mount the `persistentHome` volume at `/home/user/`. If a container component of a DevWorkspace already
mounts to `/home/user/`, the DWO-provisioned `persistentHome` volume will not be added to the DevWorkspace.

Fix #1097

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
@amisevsk amisevsk added this to the v0.22.x milestone Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants