From 8873a871875671ea998122332d6e768b4a34dff5 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Fri, 19 Feb 2021 11:33:19 +0530 Subject: [PATCH] cephfs: create subvolume with VolumeNamePrefix when user provides an option for VolumeNamePrefix create subvolume with the prefix which will be easy for user to identify the subvolumes belongs to the storageclass. Signed-off-by: Madhu Rajanna (cherry picked from commit 8720f4e2f5ba039248b0fd7e6b62487ed5092df4) --- internal/cephfs/volumeoptions.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/cephfs/volumeoptions.go b/internal/cephfs/volumeoptions.go index ab93906b2..f2258e643 100644 --- a/internal/cephfs/volumeoptions.go +++ b/internal/cephfs/volumeoptions.go @@ -210,6 +210,10 @@ func newVolumeOptions(ctx context.Context, requestName string, req *csi.CreateVo return nil, err } + if err = extractOptionalOption(&opts.NamePrefix, "volumeNamePrefix", volOptions); err != nil { + return nil, err + } + opts.RequestName = requestName err = opts.Connect(cr)