mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-27 08:40:23 +00:00
e2e: Add option to set mountoptions in sc
Updated E2E code to pass mountoptions when
creating a storageclass.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 78cdf9d4db
)
This commit is contained in:
parent
c2d0cc9ec1
commit
c06533de6b
@ -42,6 +42,8 @@ const (
|
|||||||
// rook created rbd user
|
// rook created rbd user
|
||||||
rbdNodePluginSecretName = "rook-csi-rbd-node" // nolint: gosec
|
rbdNodePluginSecretName = "rook-csi-rbd-node" // nolint: gosec
|
||||||
rbdProvisionerSecretName = "rook-csi-rbd-provisioner" // nolint: gosec
|
rbdProvisionerSecretName = "rook-csi-rbd-provisioner" // nolint: gosec
|
||||||
|
|
||||||
|
rbdmountOptions = "mountOptions"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -325,6 +327,12 @@ func createRBDStorageClass(c kubernetes.Interface, f *framework.Framework, scOpt
|
|||||||
value := scv1.VolumeBindingWaitForFirstConsumer
|
value := scv1.VolumeBindingWaitForFirstConsumer
|
||||||
sc.VolumeBindingMode = &value
|
sc.VolumeBindingMode = &value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// comma separated mount options
|
||||||
|
if opt, ok := scOptions[rbdmountOptions]; ok {
|
||||||
|
mOpt := strings.Split(opt, ",")
|
||||||
|
sc.MountOptions = append(sc.MountOptions, mOpt...)
|
||||||
|
}
|
||||||
_, err := c.StorageV1().StorageClasses().Create(context.TODO(), &sc, metav1.CreateOptions{})
|
_, err := c.StorageV1().StorageClasses().Create(context.TODO(), &sc, metav1.CreateOptions{})
|
||||||
Expect(err).Should(BeNil())
|
Expect(err).Should(BeNil())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user