-
Notifications
You must be signed in to change notification settings - Fork 350
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
RFE to allow dynamic creation of Persistent Volumes from storage classes #2994
Comments
Hi @astefanutti @squakez, I would like to work on this issue. Could you assign it to me? I'm studying the codebase and may ask questions later. |
Thanks for your interest. |
From what I see here: camel-k/pkg/trait/trait_types.go Lines 566 to 592 in cb9b886
The mount trait will just mount the PVC, no matter if the PVC is statically or dynamically provisioned. Is that right @squakez @astefanutti ? |
Yes, that's my understanding too. |
@squakez if that's the case, then this issue already had a solution? |
I think the idea of the issue is to have the trait accepting the parameters to create the PVC on the fly. As an example, we can think the following |
@squakez should we have another trait for this? I mean, the mount trait should just do what it does: mount the volume. If we need to "create" the volume, should we have another trait for it, like the pvc trait? |
@haanhvu we may reason about that for sure. In any case, the business logic would be pretty similar and you'd need to related the mount trait anyway. IMO, we should do a first development within the mount trait, and later figure it out if it makes sense to have a separate trait for that. |
This issue has been automatically marked as stale due to 90 days of inactivity. |
We could leverage the work done in f82d1e2 to dynamically create a volume based on StorageClasses |
Perhaps I can have a look |
I propose ...
An alternative could be ...
|
Consider that modifying the trait is a hard thing to do as it is encapsulated in the Integration API contract. Whatever we chose, we must try to be as stable as possible. The second approach is better, however I'd avoid to add all that redundancy. Probably the user will read the documentation where he check how to compile a given syntax. IMO, following you suggestion it would be better something like: |
Spelled out, this would be ...
Using positional arguments (i.e. pvsname=toks[0], class=toks[1], capacity=toks[2], ...) can be problematic when you have optional properties. Name and path are required, so it could perhaps be ...
This might result in some confusion ...
|
Hello @tdiesler as this is assigned to you, are you thinking to work on this for next milestone or can we clear your name from the assignees? |
We would like the option to dynamically create a persistent volume using the operator instead of having to create a Persistent Volume first and using it to mount on the integration. Is it possible to extend the Mount trait to allow provisioning of the PV from a storage class as well?
The text was updated successfully, but these errors were encountered: