mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
rbd: remove kubernetes csi prefixed parameters
remove kubernetes csi prefixed parameters from the volumeContext as we dont want to store it in the PV VolumeAttributes. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
366c2ace31
commit
a7315a04c1
@ -22,6 +22,7 @@ import (
|
|||||||
|
|
||||||
csicommon "github.com/ceph/ceph-csi/internal/csi-common"
|
csicommon "github.com/ceph/ceph-csi/internal/csi-common"
|
||||||
"github.com/ceph/ceph-csi/internal/util"
|
"github.com/ceph/ceph-csi/internal/util"
|
||||||
|
"github.com/ceph/ceph-csi/internal/util/k8s"
|
||||||
"github.com/ceph/ceph-csi/internal/util/log"
|
"github.com/ceph/ceph-csi/internal/util/log"
|
||||||
|
|
||||||
librbd "github.com/ceph/go-ceph/rbd"
|
librbd "github.com/ceph/go-ceph/rbd"
|
||||||
@ -159,7 +160,8 @@ func (cs *ControllerServer) parseVolCreateRequest(
|
|||||||
}
|
}
|
||||||
|
|
||||||
func buildCreateVolumeResponse(req *csi.CreateVolumeRequest, rbdVol *rbdVolume) *csi.CreateVolumeResponse {
|
func buildCreateVolumeResponse(req *csi.CreateVolumeRequest, rbdVol *rbdVolume) *csi.CreateVolumeResponse {
|
||||||
volumeContext := req.GetParameters()
|
// remove kubernetes csi prefixed parameters.
|
||||||
|
volumeContext := k8s.RemoveCSIPrefixedParameters(req.GetParameters())
|
||||||
volumeContext["pool"] = rbdVol.Pool
|
volumeContext["pool"] = rbdVol.Pool
|
||||||
volumeContext["journalPool"] = rbdVol.JournalPool
|
volumeContext["journalPool"] = rbdVol.JournalPool
|
||||||
volumeContext["imageName"] = rbdVol.RbdImageName
|
volumeContext["imageName"] = rbdVol.RbdImageName
|
||||||
|
Loading…
Reference in New Issue
Block a user