mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
cephfs: pass extra volume attributes to static PV
when using pre-provisioned volumes, pass these parameters: - kernelMountOptions - fuseMountOptions - subVolumeGroup in spec.csi.volumeAttributes in PV declaration Signed-off-by: YingshuoTao <frigid.blues@gmail.com>
This commit is contained in:
parent
7cbad9305f
commit
bfe64d4aee
@ -455,6 +455,18 @@ func newVolumeOptionsFromStaticVolume(volID string, options map[string]string) (
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err = extractOptionalOption(&opts.KernelMountOptions, "kernelMountOptions", options); err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = extractOptionalOption(&opts.FuseMountOptions, "fuseMountOptions", options); err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = extractOptionalOption(&opts.SubvolumeGroup, "subvolumeGroup", options); err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
if err = extractMounter(&opts.Mounter, options); err != nil {
|
if err = extractMounter(&opts.Mounter, options); err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user