diff --git a/e2e/rbd.go b/e2e/rbd.go index 18f082278..ada2f2454 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -629,6 +629,38 @@ var _ = Describe("RBD", func() { } }) + By("create a PVC and bind it to an app using rbd-nbd mounter with encryption", func() { + err := deleteResource(rbdExamplePath + "storageclass.yaml") + if err != nil { + e2elog.Failf("failed to delete storageclass with error %v", err) + } + // Storage class with rbd-nbd mounter + err = createRBDStorageClass( + f.ClientSet, + f, + defaultSCName, + nil, + map[string]string{"mounter": "rbd-nbd", "encrypted": "true"}, + deletePolicy) + if err != nil { + e2elog.Failf("failed to create storageclass with error %v", err) + } + err = validateEncryptedPVCAndAppBinding(pvcPath, appPath, noKMS, f) + if err != nil { + e2elog.Failf("failed to validate encrypted pvc with error %v", err) + } + // validate created backend rbd images + validateRBDImageCount(f, 0, defaultRBDPool) + err = deleteResource(rbdExamplePath + "storageclass.yaml") + if err != nil { + e2elog.Failf("failed to delete storageclass with error %v", err) + } + err = createRBDStorageClass(f.ClientSet, f, defaultSCName, nil, nil, deletePolicy) + if err != nil { + e2elog.Failf("failed to create storageclass with error %v", err) + } + }) + By("create a PVC and bind it to an app with encrypted RBD volume", func() { err := deleteResource(rbdExamplePath + "storageclass.yaml") if err != nil {