diff --git a/examples/rbd/groupsnapshotclass.yaml b/examples/rbd/groupsnapshotclass.yaml index 16f83db8d9a..d54d1c1b3c7 100644 --- a/examples/rbd/groupsnapshotclass.yaml +++ b/examples/rbd/groupsnapshotclass.yaml @@ -14,6 +14,10 @@ parameters: # eg: pool: rbdpool pool: + # (optional) Prefix to use for naming RBD groups. + # If omitted, defaults to "csi-vol-group-". + # volumeGroupNamePrefix: "foo-bar-" + csi.storage.k8s.io/group-snapshotter-secret-name: csi-rbd-secret csi.storage.k8s.io/group-snapshotter-secret-namespace: default deletionPolicy: Delete diff --git a/internal/rbd/manager.go b/internal/rbd/manager.go index 8b0d6a06448..ced7026fc02 100644 --- a/internal/rbd/manager.go +++ b/internal/rbd/manager.go @@ -346,8 +346,8 @@ func (mgr *rbdManager) GetVolumeGroupSnapshotByName( return nil, errors.New("required 'pool' option missing in volume group parameters") } - // groupNamePrefix is an optional parameter, can be an empty string - prefix := mgr.parameters["groupNamePrefix"] + // volumeGroupNamePrefix is an optional parameter, can be an empty string + prefix := mgr.parameters["volumeGroupNamePrefix"] clusterID, err := util.GetClusterID(mgr.parameters) if err != nil { @@ -409,8 +409,8 @@ func (mgr *rbdManager) CreateVolumeGroupSnapshot( return nil, err } - // groupNamePrefix is an optional parameter, can be an empty string - prefix := mgr.parameters["groupNamePrefix"] + // volumeGroupNamePrefix is an optional parameter, can be an empty string + prefix := mgr.parameters["volumeGroupNamePrefix"] clusterID, err := vg.GetClusterID(ctx) if err != nil {