mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: Add support for rbd ROX PVC mounting
if the PVC access mode is ReadOnlyMany or single node readonly, mounting the rbd device path to the staging path as readonly to avoid the write operation. If the PVC acccess mode is readonly, mapping rbd images as readonly. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
da40d8e05e
commit
649aeb7aaf
@ -194,3 +194,13 @@ func ConstructMountOptions(mountOptions []string, volCap *csi.VolumeCapability)
|
||||
}
|
||||
return mountOptions
|
||||
}
|
||||
|
||||
// MountOptionContains checks the opt is present in mountOptions
|
||||
func MountOptionContains(mountOptions []string, opt string) bool {
|
||||
for _, mnt := range mountOptions {
|
||||
if mnt == opt {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user