-
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
Ability to mount the same PV across mutiple workspaces (one workspace running at a time) #15652
Comments
In summary, it would be amazing if we could just attach an existing Kubernetes PersistentVolumeClaim to all workspaces, specifying the subpath in the volume to use in the devfile. This would make a huge difference to our developers performance as we rely on database backed media storage at the moment to share it amongst workspaces. |
@davidwindell that sounds like an interesting use case. Would you like to propose a patch? |
I wonder if user may want to reconfigure source for all components, like editor/plugins. If yes then what should be a better format:
components:
- id: eclipse/che-theia/7.10.0
volumes: #Here are overrides for https://github.com/eclipse/che-plugin-registry/blob/master/v3/plugins/eclipse/che-theia/7.8.0/meta.yaml#L59
- name: projects
containerPath: /projects
subfolder: /${workspaceName}/projects
claimName: my-claim #probably must be the same across devfile for all `projects` volumes
- name: plugins
containerPath: /plugins
subfolder: /${workspaceName}/plugins
claimName: my-claim
- id: redhat/java/latest
volumes:
- name: projects
containerPath: /projects
subfolder: /${workspaceName}/projects
- name: plugins
containerPath: /plugins
subfolder: /${workspaceName}/plugins
- type: dockerimage
volumes:
- name: projects
containerPath: /projects
subfolder: /${workspaceName}/projects
components:
- id: eclipse/che-theia/7.10.0
type: cheEditor
- id: redhat/java/latest
type: chePlugin
- type: dockerimage
volumes:
- name: projects
containerPath: /projects
volumes: #We know which volumes are used in our workspace and tune that here for all components
- name: project
pvcSource:
pvcName: projects
subfolder: /${workspaceName}/projects |
I don't have Java skills to contribute a patch but I like either options as long as it's possible to add an additional volume (beyond the WS project volume - we don't want to share that). |
I'm also interested in this issue, in my case, I want to use vendor software already installed in the machine, which size is several GB. I want to share it with the workspace, which contains additional configurations and software that are included in a docker image. I was also interested specifically in NFS PVC. I hope this gets attention. |
Is there a way to associate UID's with Keycloak users so each users container runs with the appropriate NFS permissions? |
@skabashnyuk any chance of getting this one a priority? |
Thank you, @davidwindell, @skabashnyuk, @amisevsk for adding the request. Kindly let us know the priority of this feature request. |
My suggestion would be that the admin would have to pre-create the PV and PVC, then all that would be required would be something like this targeting the PVC name:
|
I would also include a |
@l0rd adding devex team for setting the right priority. Atm the issue is open for devs and contributions are most welcome cc: @davidwindell @Rucadi |
Thank you, @ibuziuk , @skabashnyuk for the updates and changing the proprity to P1. (I had a look at the codebase, but didnt have any clue on where to make the changes :-)) |
I agree "NFS" is a good choice, any ideas on using "Local volumes" instead? |
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
/remove-lifecycle stale |
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
To test with a devfile v2 that allows to specify volumes as components https://docs.devfile.io/devfile/2.1.0/user-guide/api-reference.html |
/remove-lifecycle stale |
This is still outside the devfile 2.0 spec -- volume components still get subpathed into the common PVC. I had created an issue devfile/api#374 to address this use case, but it got delayed out of the initial 2.0 release. |
@davidwindell I have changed the title of this issue because I got confused initially: that's about reusing the same PV again and again on developers workspaces. In general I think that we should avoid to specify the name of a PVC in a devfile because, if we do that, it won't be portable anymore. I think that injecting PVs using labels and annotations as we do for secret would be a cleaner approach. |
In that case the devfile would still not be portable, if e.g. the project you're building expects a specific volume to be mounted. |
That's a good point :-) |
At the end of the day, portability doesn't matter when Che is being used internally and all developers are crying out for shared storage. |
@davidwindell in both cases your problem will be solved. The modification at the devfile spec level may be harder to get accepted and implemented. Today the devfile is used by Che but also other projects and we are really careful on what we introduce in the spec. And I am still in favor of PV labelling rather than an explicit reference of a PVC in the devfile spec. PV labelling is like dependency injection: you do not need to hardcode the PVC name in the workspace definition, that will be resolved at runtime. |
I've created issue devfile/devworkspace-operator#503 on the DevWorkspace Operator side for further discussion. It's not specific to Che, but when Che switches to DWO as the workspace engine, this feature would come to Che as well. The way I'd see it implemented (not having spent a lot of time thinking about it yet) would be
@davidwindell WDYT? Does this fit your use cases? |
I think that would work really well! |
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
This is fixed by devfile/devworkspace-operator#544 |
Is your enhancement related to a problem? Please describe.
We would like to be able to attach a persistent volume (in our case an EFS volume) that is shared across multiple workspaces on Che. This would allow us to share static assets that are stored on an NFS drive with all workspaces of the same project. We work on large web projects where GBs of media needs to be mounted into the workspace.
Describe the solution you'd like
It would be great to be able to define this in the devfile, for example:
Describe alternatives you've considered
We thought of using the Kubernetes custom resource section of the devfile but this doesn't seem to work.
The text was updated successfully, but these errors were encountered: