-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow to configure workspaces persistent storage from Eclipse Che CR #21405
Comments
Related: devfile/devworkspace-operator#843 |
A few additional notes:
|
This ambiguity has been confusing me a bit, too. Something that came to mind, however, is perhaps we need to use the
This question still holds - from what I understand, |
On the DevWorkspace Operator level, we can't change the default. Currently, DWO treats an empty/blank storage type as In fact, the DevWorkspace Operator does not allow changing the storage type of a DevWorkspace once it has been used for this reason. Otherwise, flows like
would result in all the data saved in the common PVC to be left in-tact with no clear way to clean it up short of doing it manually or deleting the DevWorkspace. Eventually, this would result in the common PVC being full of old data, preventing new workspaces from functioning correctly. |
After some discussion, it was decided to change the CR properties to make it more straightforward and do NOT use DWOC for configuring any of the storage properties from the Eclipse Che CR, since it complicates the flow and would create a global DevWorkspace Operator configuration which in some cases might not be desired. The current plan is:
Caveats:
|
I don't understand how it correlates with the current CheCluster CR configuration workspaces:
storage:
pvc:
claimSize: <size>
storageClass: <classname>
pvcStrategy: <strategy> |
The idea is to:
That's why I would rather add a new field: devEnvironments:
storage:
pvcStrategy: <strategy>
- pvc:
- claimSize: <size>
- storageClass: <classname>
+ perUserStrategyPvcConfig:
+ claimSize: <size>
+ storageClass: <classname> |
The issue is that since checluster v2 has released, the |
Catalog source to test: apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: eclipse-che-subscription
namespace: openshift-operators
spec:
channel: next
installPlanApproval: Manual
name: eclipse-che-preview-openshift
source: eclipse-che-custom-catalog-source
sourceNamespace: openshift-operators
startingCSV: eclipse-che-preview-openshift.v7.50.0-621.next CheCluster CR: ...
devEnvironments:
defaultNamespace:
template: <username>-che
storage:
pvc:
claimSize: 10Gi
storageClass: default
pvcStrategy: common
... After upgrading Eclipse Che to ...
devEnvironments:
defaultNamespace:
template: <username>-che
storage:
pvcStrategy: common
... So, there are no issues with upgrading. |
On my end, I have verified on the dogfooding instance that once namespace is removed it will be recreated by che-server on the next login, which means that namespace configuration [1] routine will be triggered |
I've verified @tolusha's sample -- seems to work. Don't know what problem I ran into in the past 🤷 |
The 'per-user' storage type is an alternate storage-class name for the 'common' storage class. In other words, it is an alias for the 'common' storage class and behaves in the same manner. Part of eclipse-che/che#21405 Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
The 'per-user' storage-type is an alternate storage-type name for the 'common' storage-type. In other words, it is an alias for the 'common' storage-type and behaves in the same manner as the 'common' storage-type. Part of eclipse-che/che#21405 Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Allow specifying an external DWOC that gets merged with the workspace's internal DWOC. The external DWOC's name and namespace are specified with the `controller.devfile.io/devworkspace-config` DevWorkspace attribute, which has the following structure: attributes: controller.devfile.io/devworkspace-config: name: <string> namespace: <string> Part of eclipse-che/che#21405 Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Allow specifying an external DWOC that gets merged with the workspace's internal DWOC. The external DWOC's name and namespace are specified with the `controller.devfile.io/devworkspace-config` DevWorkspace attribute, which has the following structure: attributes: controller.devfile.io/devworkspace-config: name: <string> namespace: <string> Part of eclipse-che/che#21405 Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
@olexii4 I apologize for the late notice, I realized another attribute needs to be added to devfiles for this feature to work. The attribute is attributes:
controller.devfile.io/devworkspace-config:
name: <string>
namespace: <string> It specifies the name and namespace of the external, che-operator-provided devworkspace-operator configuration that should be used for the workspace. My task today will be to work on the che-operator patch that creates this devworkspace-operator configuration that the attribute references. There are 2 ambiguities, however, @ibuziuk @l0rd:
|
I would not prefix it with
We are going to have a single DWOC used by all users, right? in this case it makes sense to have it in the namespace where Eclipse Che CR is created. |
👍 I agree with @ibuziuk answers |
7.52.x: eclipse-che/che-operator#1490 |
Correct
Sounds good :) |
Allow specifying an external DWOC that gets merged with the global DWOC for use by a workspace. During the merge, the fields which are set in the external DWOC will overwrite those existing in the internal/global DWOC, resulting in a merged DWOC to be used by the workspace. The internal/global DWOC will remain unchanged after the merge. The external DWOC's name and namespace are specified with the `controller.devfile.io/devworkspace-config` DevWorkspace attribute, which has the following structure: attributes: controller.devfile.io/devworkspace-config: name: <string> namespace: <string> Part of eclipse-che/che#21405 Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Allow specifying an external DWOC that gets merged with the global DWOC for use by a workspace. During the merge, the fields which are set in the external DWOC will overwrite those existing in the internal/global DWOC, resulting in a merged DWOC to be used by the workspace. The internal/global DWOC will remain unchanged after the merge. The external DWOC's name and namespace are specified with the `controller.devfile.io/devworkspace-config` DevWorkspace attribute, which has the following structure: attributes: controller.devfile.io/devworkspace-config: name: <string> namespace: <string> Part of eclipse-che/che#21405 Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Allow specifying an external DWOC that gets merged with the global DWOC for use by a workspace. During the merge, the fields which are set in the external DWOC will overwrite those existing in the internal/global DWOC, resulting in a merged DWOC to be used by the workspace. The internal/global DWOC will remain unchanged after the merge. The external DWOC's name and namespace are specified with the `controller.devfile.io/devworkspace-config` DevWorkspace attribute, which has the following structure: attributes: controller.devfile.io/devworkspace-config: name: <string> namespace: <string> Part of eclipse-che/che#21405 Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Today, after merging all the relevant PRs and testing on dogfooding 2 more issues have been created that need to be resolved before closing this story: |
Closing as completed |
Sync'd with Red Hat JIRA https://issues.redhat.com/browse/CRW-3630 |
sync'd to Red Hat JIRA https://issues.redhat.com/browse/CRW-3854 |
Is your task related to a problem? Please describe
CheCluster API v2 [1] is going to have the dedicated properties for workspace storage configuration:
once specified those properties should be used as defaults for DevWorkspaces creation
[1] eclipse-che/che-operator#1324
Describe the solution you'd like
Configure storage related properties from the Eclipse Che CR
Release Notes Text
Workspaces persistent storage options like the strategy and the size are now configurable using
CheCluster
CR. It's also possible to set the storage strategy to per-workspace now so that developers will be able to run multiple workspaces concurrently.The text was updated successfully, but these errors were encountered: