From cec3942d72652a158451c033b3c1c4656d295c08 Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Mon, 21 Feb 2022 14:51:03 -0700 Subject: [PATCH] test: run encrypted tests with nbd driver The encryption on the wire requires either the 5.11 kernel or the nbd driver. Until the kernel update is available in minikube we use the rbd-nbd. Signed-off-by: Travis Nielsen --- tests/framework/installer/ceph_manifests.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/framework/installer/ceph_manifests.go b/tests/framework/installer/ceph_manifests.go index 5d9f0f956..c0333cd42 100644 --- a/tests/framework/installer/ceph_manifests.go +++ b/tests/framework/installer/ceph_manifests.go @@ -294,7 +294,7 @@ spec: func (m *CephManifestsMaster) GetBlockStorageClass(poolName, storageClassName, reclaimPolicy string) string { // Create a CSI driver storage class - return ` + sc := ` apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: @@ -311,13 +311,19 @@ parameters: imageFeatures: layering csi.storage.k8s.io/fstype: ext4 ` + if m.settings.ConnectionsEncrypted { + // encryption requires either the 5.11 kernel or the nbd mounter. Until the newer + // kernel is available in minikube, we need to test with nbd. + sc += " mounter: rbd-nbd" + } + return sc } func (m *CephManifestsMaster) GetFileStorageClass(fsName, storageClassName string) string { // Create a CSI driver storage class csiCephFSNodeSecret := "rook-csi-cephfs-node" //nolint:gosec // We safely suppress gosec in tests file csiCephFSProvisionerSecret := "rook-csi-cephfs-provisioner" //nolint:gosec // We safely suppress gosec in tests file - return ` + sc := ` apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: @@ -332,6 +338,12 @@ parameters: csi.storage.k8s.io/node-stage-secret-name: ` + csiCephFSNodeSecret + ` csi.storage.k8s.io/node-stage-secret-namespace: ` + m.settings.Namespace + ` ` + if m.settings.ConnectionsEncrypted { + // encryption requires either the 5.11 kernel or the fuse mounter. Until the newer + // kernel is available in minikube, we need to test with fuse. + sc += " mounter: fuse" + } + return sc } // GetFilesystem returns the manifest to create a Rook filesystem resource with the given config.