metal-stack / csi-driver-lvm

MIT License
120 stars 25 forks source link

chmod 0777 causes recursively setting volume ownership even with fsGroupChangePolicy: OnRootMismatch #79

Closed jonasasx closed 1 year ago

jonasasx commented 1 year ago

kubelet on mounting PV checks SGID flag (0x2000). If it is absent, recursively setting volume ownership starts. https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/volume_linux.go#L153

mountLV method must not clear SGID flag https://github.com/metal-stack/csi-driver-lvm/blob/master/pkg/lvm/lvm.go#L210.

jonasasx commented 1 year ago

Why chmod command on mounting is needed?

jonasasx commented 1 year ago

@mwennrich, @majst01 Could you comment it?