-
Notifications
You must be signed in to change notification settings - Fork 135
Volume Mounter trait creates PVC with "ephemeral: true" configuration #522
Comments
I think if you decide to include vol mounter trait such as: not a real bug but needs more docs |
I think the bug is that a trait acts without any context in the current rudr implementation. Each trait's action is pre determined regardless of the component it applies to. The volume-mounter just creates a PVC no matter what. We need to fix this in the new OAM go implementation. We may also need to add a policy field into the component in the spec too so that the trait will behave just as the application developer expected. |
Another thing is that the the spec didn't say what happens when there are multiple containers/volumes in the component so it's probably not a good example. We should remove the semantics of the ephemeral. |
The problem is that when the PVC/PV are created, the cloud provider also created resources behind the scenes - as mentioned in the bug details, in this case it was an Azure Disk. This is not desirable. If all that's required is an |
^ agree. Just out of curiosity, what is the "new OAM go implementation" you referred to? Is it the same as the |
It's not the same but it will probably use oam-go-sdk. It's still in the planning phase. |
I agree with @zhxu2 The volume-mounter trait (better named as PV trait?) should be set in AppConfig if ephemeral=true. |
The ideal solution to this problem is to intercept and reject invalid AppConfigs in Admission webhook: https://github.com/oam-dev/admission-controller/ |
Output of helm version:
Output of kubectl version:
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
Azure Kubernetes Service
Describe the bug
As per Volume mounter trait doc, PVC should not be created for ephemeral (
ephemeral: true
)OAM yaml files used
Component
App config
What happened:
What you expected to happen:
PV and PVC should not be created since ephemeral storage was requested in
ComponentSchematic
Relevant screenshots:
How to reproduce it (as minimally and precisely as possible):
Create the OAM
Component
followed by theApplicationConfiguration
(contents pasted above)Anything else we need to know:
The
Deployment
usesemptyDir
volume type (not PVC)The text was updated successfully, but these errors were encountered: