openebs / dynamic-localpv-provisioner

Dynamically deploy Stateful Persistent Node-Local Volumes & Filesystems for Kubernetes that is provisioned from simple Local-Hostpath /root storage.
https://openebs.io
Apache License 2.0
143 stars 63 forks source link

Add support to specify file permissions for pvc hostpaths #95

Open kmova opened 3 years ago

kmova commented 3 years ago

Describe the problem/challenge you have Depending on the type of pods using the Local volumes, storage class should provide options to customize the permissions on the host path subdirectories. By default, the permissions are set to 0777.

Describe the solution you'd like The customizations can be passed down via the StorageClass CAS config options.

Anything else you would like to add: As part of this issue, we should explore options around:

sushiMix commented 2 years ago

Hello, Is there some news about this ticket ?

sushiMix commented 1 year ago

Is this repository still maintained ? @niladrih ?

niladrih commented 1 year ago

Is this repository still maintained ? @niladrih ?

Yes it is @sushiMix ! I'm sorry I haven't been able to take a look at your PR... I'll be reviewing it later today. Thank you for your contribution!

sushiMix commented 1 year ago

@niladrih Hello, any news ?

niladrih commented 1 year ago

Hi @sushiMix. I'm sorry about the delay I have caused you. I've reviewed your PR. I'll repeat myself here as well: An implementation for this feature exists in the openebs/dynamic-nfs-provisioner repo. PR link: https://github.com/openebs/dynamic-nfs-provisioner/pull/125

It'd be a good idea to use similar cas-config parameters. And even if we don't implement the API fully (i.e. include file-permissions along with file-mode), it'd be a good idea to use the same parameter names on the storageClass/PVC to keep the file-permissions API uniform across openebs storage engines. Wdyt?

sushiMix commented 1 year ago

@niladrih thank you, I'll check to upgrade the PR.

I updated the code, it should import from Storage class and PVC by override. Need a bit of tests (before submitting the update of the PR) on my side and see later for user/group management (technically kubelet will perform the job as the PV is already using local path).