Add ability to create NFS Volumes
wyvernzora opened this issue · 0 comments
wyvernzora commented
Description of the feature or enhancement:
NFS Volumes
Use Case:
I need to mount NFS volumes to my pods. Unfortunately, due to how the Volume
class is set up, I cannot easily create an NFS volume to pass into the Deployment
construct.
My current workaround for this is the following:
const volume = Volume.fromEmptyDir(this, 'data-volume', 'data-volume', { });
const obj: any = volume as any;
obj.config = {
nfs: {
server: '169.254.0.1'
}
};
Proposed Solution:
- Add a new static constructor on the
Volume
class to support creating NFS volumes. The underlyingk8s.Volume
already hasnfs
property defined on it. - To support other volume types that do not have static constructors defined, I suggest making the
Volume
class constructor public or protected, so that users are left with flexibility to pass in their own configuration objects if they have to.
Other:
I can help put together a PR if needed
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request