mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-11 22:10:11 +01:00
fix(readonly): honouring readonly flag.
Readonly flag does not come as mount option, it has separate field to mention readonly flag. ZFS-LocalPV driver should check that field and add "ro" as mountoption. Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
d47ec3ba01
commit
42ed7d85ee
2 changed files with 4 additions and 5 deletions
|
|
@ -76,9 +76,12 @@ func GetVolAndMountInfo(
|
|||
|
||||
mountinfo.FSType = req.GetVolumeCapability().GetMount().GetFsType()
|
||||
mountinfo.MountPath = req.GetTargetPath()
|
||||
mountinfo.ReadOnly = req.GetReadonly()
|
||||
mountinfo.MountOptions = append(mountinfo.MountOptions, req.GetVolumeCapability().GetMount().GetMountFlags()...)
|
||||
|
||||
if req.GetReadonly() {
|
||||
mountinfo.MountOptions = append(mountinfo.MountOptions, "ro")
|
||||
}
|
||||
|
||||
getOptions := metav1.GetOptions{}
|
||||
vol, err := volbuilder.NewKubeclient().
|
||||
WithNamespace(zfs.OpenEBSNamespace).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue