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

Compute required size for per-workspace PVC when all volumes have sizes specified. #947

Closed
amisevsk opened this issue Oct 6, 2022 · 2 comments
Assignees
Labels
new&noteworthy For new and/or noteworthy issues
Milestone

Comments

@amisevsk
Copy link
Collaborator

amisevsk commented Oct 6, 2022

Description

Devfile volume components support specifying a size parameter, which is currently ignored. This means that the configured default value for PVC size is always used, even if a DevWorkspace specifies the size of all volumes.

Instead, DWO should have a mechanism for computing PVC size from all volumes in the DevWorkspace, and use that if the request is larger than the default. This would enable supporting workspaces that require a lot of storage without increasing the default request for all workspaces.

Release Notes Text

Title Honor devfile volumes sizes when storage strategy is per-workspace
Eclipse Che now honors the volume size specified in a devfile. That's applied when the PersistentVolume is created per-workspace. When the PV is created per-user (i.e. one PV is shared across all the workspaces of a user) the volume size is ignored.

@AObuchow
Copy link
Collaborator

DWO should have a mechanism for computing PVC size from all volumes in the DevWorkspace, and use that if the request is larger than the default.

Is it a strict requirement to use the calculated size only if it's larger than the default size? There's a tradeoff: save space if you don't need to default 5Gi, or ensure you have always headroom if the calculated size is smaller than the default. Not sure which is better.

In my mind, having headroom seems better, but it is up for debate.

CC: @ibuziuk @l0rd

@amisevsk
Copy link
Collaborator Author

Given what we've found with per-workspace PVCs, using whatever is defined and ignoring defaults is probably the right choice. The main concern would be once-working devfiles no longer working right, but its easily remedied (request as much memory as you actually need).

AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Jan 16, 2023
Fix devfile#947

When using the per-workspace storage strategy, it is now possible for a workspace to use a PVC other than the default PVC size set in the DWOC.
The non-default PVC size is calculated by summing the size of volume components in the devworkspace.

The following rules determine whether or not the computed PVC size will be used:

- If the PVC size is specified in a configmap, it will take priority and the computed PVC size will not be used.

- If all volumes in a devworkspace specify their size, the computed PVC size will be used.

- If all volumes in a devworkspace either specify their size or are ephemeral, the computed PVC size will be used.

- If at least one volume in a devworkspace specifies its size, and the computed PVC size is greater than the default per-workspace PVC size, the computed PVC size will be used.

Signed-off-by: Andrew Obuchowicz <[email protected]>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Jan 18, 2023
Fix devfile#947

When using the per-workspace storage strategy, it is now possible for a workspace to use a PVC other than the default PVC size set in the DWOC.
The non-default PVC size is calculated by summing the size of volume components in the devworkspace.

The following rules determine whether or not the computed PVC size will be used:

- If the PVC size is specified in a configmap, it will take priority and the computed PVC size will not be used.

- If all volumes in a devworkspace specify their size, the computed PVC size will be used.

- If all volumes in a devworkspace either specify their size or are ephemeral, the computed PVC size will be used.

- If at least one volume in a devworkspace specifies its size, and the computed PVC size is greater than the default per-workspace PVC size, the computed PVC size will be used.

Signed-off-by: Andrew Obuchowicz <[email protected]>
@l0rd l0rd added the new&noteworthy For new and/or noteworthy issues label Feb 2, 2023
@amisevsk amisevsk added this to the v0.19.x milestone Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new&noteworthy For new and/or noteworthy issues
Projects
None yet
Development

No branches or pull requests

3 participants