mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-26 08:10:20 +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>
This commit is contained in:
parent
2f7e51076b
commit
78cdf9d4db
@ -44,6 +44,7 @@ const (
|
|||||||
rbdProvisionerSecretName = "rook-csi-rbd-provisioner" // nolint: gosec
|
rbdProvisionerSecretName = "rook-csi-rbd-provisioner" // nolint: gosec
|
||||||
|
|
||||||
rookTolBoxPodLabel = "app=rook-ceph-tools"
|
rookTolBoxPodLabel = "app=rook-ceph-tools"
|
||||||
|
rbdmountOptions = "mountOptions"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -311,6 +312,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