-
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 pod-overrides of volumes
and container-overrides of volumeMounts
in Devfiles
#22751
Comments
There are currently a couple of options to mount a CSI volume:
@cgruver can you confirm that those 2 options don't work for your use case? And that what you are requesting is to add the capability in the Devfile API? For example: schemaVersion: 2.2.0
metadata:
name: mydevfile
components:
- name: mydevfile
container:
(...)
volumeMounts:
- name: cache
path: /.cache
- name: cache
volume:
size: 2Gi
+ csi:
+ driver: some-csi-driver My worry is this will make the Devfile less portable (i.e. it works on my cluster but doesn't on yours). |
@l0rd The use case in question here is not for PVCs, but for things like AWS Secrets Manager or SPIFFE. The CheCluster CR config will not work, because these CSI volumes will often be workspace specific, and it's possible that there will be a need for volumes from different drivers. The easiest option is probably to allow them to be injected via
Portability is less of an issue, because in this scenario, the workspace is dependent on the volume anyway. If a given cluster does not have the needed CSI drivers, then the workspace won't work anyway. |
@cgruver ok, I am still not sure if the developer can or not pre-create the volume. And adding this information in the devfile still looks like a hack. However I agree with you that the For a better solution to this use case: have you thought about leveraging the cloud-credential-operator? We introduced the support for SA token volume projection to add GCP credentials in workspaces (see GCP workload identity federation) when the cloud-credential-operator is installed and configured in the cluster. The cloud-credential-operator supports AWS out of the box (and I assume that SPIFFE could be supported too). |
volumes
and container-overrides of volumeMounts
in Devfiles
volumes
and container-overrides of volumeMounts
in Devfilesvolumes
and container-overrides of volumeMounts
in Devfiles
Pod/container overrides for volumes/volumemounts is now possible thanks to devfile/devworkspace-operator#1223 I'm able to add a CSI volume to a devworkspace pod/container by following these steps to create a Example overrides:
I believe this covers your use case @cgruver ? |
I have a permissions issue when trying with Che however (my cluster died): Status
|
Yes! That covers the use case. |
Mounting the SharedSecret like so: #22751 (comment) is working in the latest Che: To get it working, I manually added ![]() |
Is your enhancement related to a problem? Please describe
It is not currently possible to add CSI volume mounts to a users workspace.
CSI is not permitted in the SCC used by Dev Spaces.
There is no mechanism in the devfile to specify volumes other than from the cluster storage provisioner
Describe the solution you'd like
Create a mechanism to add CSI volume mounts to a workspace.
The ideal solution is probably through the volumes fields in a devfile, but that might take longer to implement.
A near-term solution is to allow adding volumes to the workspace pod with
pod-overrides
and volume-mounts to a container withcontainer-overrides
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: