-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
NFS support violates CSI spec #1224
Comments
@gnufied thanks for raising the issue.
|
Then IMO it should be performed by kubelet and not by the CSI driver. But strictly speaking that is not the only solution, for most of kubernetes lifetime users of NFS have done with using
No the The problem is workload portability. Kubernetes is designed to behave same way regardless of where an workload is deployed. We try really hard to provide same user experience for our users regardless of where they are deploying their workloads but we are not keeping our promise here by not respecting fields inside pod specs. Now coming back to |
Let me clarify why it is important that we don't duplicate what kubelet is supposed to do in the driver. It is because several of internal k8s bits depends on kubelet's behaviour. Take subpath support for example, that code subtley depends on Then there is integration with CRI for id-mapped mounts etc being proposed. All of this depends on letting kubelet do its own things and not duplicate the functionality. If Kubelet changes its behaviour tomorrow (and all of this copied code is internal kubelet details), then we could break our users. |
@gnufied for
I have to make some workaround, otherwise |
One thing I was thinking about to get out of this situation is to have two CSI drivers, one for NFS and second for CIFS. They can be handled by the same azurefile-csi-driver binary, just with a different cmdline options to set their own respective driver name + CSIDriver instance with their own fsGroupPolicy. As downside, there would be two DaemonSets + Deployments with the controllers. In the future, I could imagine even one Pod (driver + sidecars) handling two or more CSI drivers, but that would probably need bigger changes in the sidecars - the driver would expose two sockets + a sidecar would connect to both of them + route all CSI calls to the right one. |
I have worked out #1236 to address this issue |
@andyzhangx, if I understand #1236 correctly, we should then run two CSI driver deployments/daemon sets and have the NFS one run with |
@jsafrane the nfs one should run as |
The NFS support in CSI driver directly violates CSI spec:
The above wording makes it clear that provided
volume_mount_group
should be used as a mount option formount
system call. But NFS driver instead uses it to recurivelychown
andchmod
volumes.The support in CSI driver also breaks several Kubernetes conventions. The
file
ormount
properties of CSI driver should be configurable viaCSIDriver
object. ThefsGroupChangePolicy
should come from pod object (instead of being configurable in StorageClass).The text was updated successfully, but these errors were encountered: