mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
add rbd-nbd mounter in storage class
Signed-off-by: Huamin Chen <hchen@redhat.com>
This commit is contained in:
@ -42,6 +42,7 @@ const (
|
||||
rbdImageWatcherInitDelay = 1 * time.Second
|
||||
rbdImageWatcherFactor = 1.4
|
||||
rbdImageWatcherSteps = 10
|
||||
rbdDefaultMounter = "rbd"
|
||||
)
|
||||
|
||||
type rbdVolume struct {
|
||||
@ -54,6 +55,7 @@ type rbdVolume struct {
|
||||
VolSize int64 `json:"volSize"`
|
||||
AdminId string `json:"adminId"`
|
||||
UserId string `json:"userId"`
|
||||
Mounter string `json:"mounter"`
|
||||
}
|
||||
|
||||
type rbdSnapshot struct {
|
||||
@ -226,6 +228,10 @@ func getRBDVolumeOptions(volOptions map[string]string) (*rbdVolume, error) {
|
||||
if !ok {
|
||||
rbdVol.UserId = rbdDefaultUserId
|
||||
}
|
||||
rbdVol.Mounter, ok = volOptions["mounter"]
|
||||
if !ok {
|
||||
rbdVol.Mounter = rbdDefaultMounter
|
||||
}
|
||||
return rbdVol, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user