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:
YingshuoTao 2021-06-02 19:14:58 +08:00 committed by mergify[bot]
parent 7cbad9305f
commit bfe64d4aee

View File

@ -455,6 +455,18 @@ func newVolumeOptionsFromStaticVolume(volID string, options map[string]string) (
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 {
return nil, nil, err
}