Commit Graph

134 Commits

Author SHA1 Message Date
Madhu Rajanna
a45ad5be9f rebase: update external-snapshotter client to v7
updating external-snapshotter client to
use the latest release

updates #4435

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-02-20 10:18:11 +00:00
Madhu Rajanna
e008e16095 e2e: add e2e to test static pvc
added e2e test case to verify static
pvc with and without fsName in the PV
object.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-01-12 18:27:45 +00:00
Praveen M
6f9b1ab04d cephfs: remove subvolumegroup creation
Signed-off-by: Praveen M <m.praveen@ibm.com>
2023-11-10 11:41:35 +00:00
karthik-us
5ff0607360 e2e: To test 500MB PVC creation
Adding e2e test to check for successful PVC creation
of 500MB.

Signed-off-by: karthik-us <ksubrahm@redhat.com>
2023-10-12 17:31:46 +00:00
Madhu Rajanna
9809f365fc e2e: add e2e test for RWX from ROX
added an e2e test case to create
RWX clone from ROX and also try
to write extra data in the RWX
cloned PVC.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-08-31 11:51:18 +00:00
riya-singhal31
d435b59656 e2e: add timeout for pvc deletion in ephemeral e2e
this commit adds the timeout to wait for pvc
deletion after the deletion of pod in test.

Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
2023-08-25 14:22:00 +00:00
rakshith-r
f1e9d8084a cephfs: set Pool parameter to empty for Snapshot-backed volumes
Set VolumeOptions.Pool parameter to empty for Snapshot-backed volumes.
This Pool parameter is optional and  only used as 'pool-layout' parameter
during subvolume and subvolume clone create request in cephcsi
and not used for Snapshot-backed volume at all.
It is not saved anywhere for use in subsequent operations after create too.
Therefore, We can set it to empty and not error out.

Signed-off-by: rakshith-r <rar@redhat.com>
2023-08-17 16:13:48 +00:00
riya-singhal31
a7d259a334 e2e: add test for validation of kernelMountOption
Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
2023-07-05 11:20:47 +00:00
riya-singhal31
330995751a e2e: add test for validation of fuseMountOptions
Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
2023-07-05 11:20:47 +00:00
Rakshith R
54eeac212e e2e: add test cases for pv.Spec.MountOptions
Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-19 09:51:40 +00:00
karthik-us
e4e373cd47 e2e: Make getConfigFile() generic
Update the getConfigFile() function to allow any file to be looked
at on the preferred location first and fall back to the alternate
location if it does not exist there.

Signed-off-by: karthik-us <ksubrahm@redhat.com>
2023-06-07 12:51:43 +00:00
karthik-us
6ac3a4dabc cleanup: Move common files to deploy folder
Few common files related to deployments were kept
in the examples folder initially. Moving them to
deploy folder and updating the relevant files.

Signed-off-by: karthik-us <ksubrahm@redhat.com>
2023-06-07 12:51:43 +00:00
Niels de Vos
e6627198d4 e2e: pass context.TODO() to k8s.e2e functions
Many Kubernetes test framework functions now require a context to be
passed. Use `context.TODO()` for this, just like is done for some of the
functions already.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-06-06 12:21:43 +00:00
Niels de Vos
a6c14c051f build: address golint warnings
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-06-05 04:49:46 +00:00
Niels de Vos
81218a69f9 build: address nolintlint errors from new golangci-lint
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-06-05 04:49:46 +00:00
riya-singhal31
6f54b88b26 e2e: remove extra check for snapshot count
snapshot count validation has already done after the deletion
of snapshot

Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
2023-04-13 14:26:06 +00:00
riya-singhal31
b28b5e6c84 cephfs: use shallow volumes for the ROX accessMode
this commit makes shallow volume as default feature for ROX volumes.

Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
2023-02-21 20:09:13 +00:00
riya-singhal31
60c98837ca e2e: fix typo
Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
2023-02-15 08:13:41 +00:00
Madhu Rajanna
9c8de9471e rebase: update kubernetes to 1.26.1
update kubernetes and its dependencies
to v1.26.1

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-02-03 08:55:43 +00:00
Marcel Lauhoff
e5ebd23709 e2e: add cephfs fscrypt snapshot volume test
Signed-off-by: Marcel Lauhoff <marcel.lauhoff@suse.com>
2022-11-23 12:21:02 +00:00
Marcel Lauhoff
a53a64129d e2e: add PVC-PVC clone Ceph FS fscrypt tests
Note: Feature fixed https://tracker.ceph.com/issues/57641

Signed-off-by: Marcel Lauhoff <marcel.lauhoff@suse.com>
2022-11-23 12:21:02 +00:00
Marcel Lauhoff
8d38107fd6 e2e: add basic PVC Ceph FS fscrypt tests
Test storage class, pvc and app bind of an fscrypt encrypted Ceph FS
with secrets metadata, vault, vault tokens and vault tenant KMS.

Tests are based on the RBD block/file encryption tests.

Signed-off-by: Marcel Lauhoff <marcel.lauhoff@suse.com>
2022-11-23 12:21:02 +00:00
Marcel Lauhoff
638f77a95c e2e: Deploy vault as part of the Ceph FS suite
Always deploy Vault as part of the the Ceph FS test suite.

Required by:
 - fscrypt tests using any vault KMS type.
 - Configuration in deploy/cephfs/*.yaml via the
   ceph-csi-encryption-kms-config config map created during deployVault()

Signed-off-by: Marcel Lauhoff <marcel.lauhoff@suse.com>
2022-11-23 12:21:02 +00:00
Madhu Rajanna
28f51aaaf7 e2e: add snapshot count validation
Add snapshot count validation for cephfs
and nfs to avoid resource leak.

fixes: #3224

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-11-21 12:16:10 +00:00
Madhu Rajanna
c5a6d11a8f e2e: correct int format
use %d when formatting the int
value.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-11-21 12:16:10 +00:00
Humble Chirammal
628263e9b1 e2e: use CurrentSpecReport for failed spec run
CurrentGinkgoTestDescription() has been deprecated in favor of
CurrentSpecReport and this commit address the same.

Ref#https://github.com/onsi/ginkgo/blob/master/deprecated_dsl.go#L53

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-11-10 09:30:38 +00:00
Madhu Rajanna
607c654263 e2e: set privileged as pod security enforcement level
setting privileged as pod security enforcement level
to run test on kubernetes 1.25

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-10-26 14:32:51 +00:00
Madhu Rajanna
ade8b91516 rebase: update gingko to v2 version
Ginkgo v1 is deprecated and was replaced
with the v2.

Ref: https://onsi.github.io/ginkgo/
MIGRATING_TO_V2#upgrading-to-ginkgo-20

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-08-25 16:36:35 +00:00
Madhu Rajanna
96a3aabe5a deploy: remove psp from cephcsi
as PSP is deprecated in kubernetes 1.21
and will be removed in kubernetes 1.25
removing the existing PSP related templates
from the repo and updated the required documents.

fixes #1988

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-08-23 07:53:46 +00:00
Prasanna Kumar Kalever
cf97e377fa e2e: validate clusterName metadata
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-08-01 07:15:29 +00:00
Prasanna Kumar Kalever
c32e71b31c e2e: CephFS validate restore and clone metadata
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-07-28 19:37:23 +00:00
Prasanna Kumar Kalever
eb55096ebd e2e: add test case for snapshot metadata validation
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-07-28 19:37:23 +00:00
Prasanna Kumar Kalever
2390a43415 e2e: add tests to validate cluster name
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-07-28 04:07:52 +00:00
Prasanna Kumar Kalever
25ce21f496 e2e: add test cases for subvolume metadata validation
create a PVC and check PVC/PV metadata on cephFS subvolume

Fixes: #2875
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-07-28 04:07:52 +00:00
Madhu Rajanna
efabe70a46 e2e: remove kubernetes 1.22 check
We run CI jobs on kubernetes 1.22 by default
and we dont need to have a check to make sure
we have atleast Kubernetes 1.22 for few tests.
As we have CI runs on 1.22 by default, Removing
unwanted check.

updates: #3086
depends-on #3255

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-07-25 07:35:41 +00:00
Madhu Rajanna
d7bf51b255 rebase: update csi-snapshotter to v6
as we have v6.0.0 of the external snapshotter
updating the dependency for the same.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-06-16 18:45:33 +00:00
Robert Vasek
79cb1b3849 e2e: add test for cephfs snapshot-backed volumes
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-06-16 09:44:27 +00:00
Madhu Rajanna
1952a9b4b3 ci: fix all linter errors found in golangci-lint
Fixing all the linter errors found in golang-ci
lint v1.46.2

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-06-03 12:55:54 +00:00
Humble Chirammal
2cb52d6535 e2e: remove the generic ephemeral volume support check
at present we have the check for kube version 1.21 in the tests
which no longer required as it falls under supported kubernetes
versions with the driver.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-05-26 13:43:17 +00:00
Prasanna Kumar Kalever
ea8a3548e6 e2e: validate omap objects per cephfs test case
validate omap count in every testcase right after
validateSubvolumeCount()

Fixes: #2834
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-05-12 18:47:27 +00:00
Niels de Vos
9f08cb7ea0 e2e: re-order deployment components
Some of the deployment artifacts refer to others (like ServiceAccount in
a Deployment). If the dependencies are not available (yet), there will
be errors reported in the logs. By deploying the components in a more
correct order, fewer errors are reported, making the logs a little
easier to understand.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-05-11 14:58:28 +00:00
Niels de Vos
eb70fb9fd4 e2e: add minimal tests for NFS-provisioner
The tests for the NFS-provisioner can be run by passing -deploy-nfs and
-test-nfs as parameters to the `go test` or `e2e.test` command.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-05-10 00:43:43 +00:00
Niels de Vos
5e66372e31 e2e: allow RWOP tests to fail
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-04-21 16:22:49 +00:00
Niels de Vos
60442fa916 e2e: use ResourceDeployer for CephFS
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-04-21 00:22:53 +00:00
Niels de Vos
701b5d7ecb e2e: Add early return in Context() for disabled tests
Some parts of the Context() seem to get executed, even when BeforeEach()
did a Skip() for the test. By adding a return inside the Context(), the
tests should not get executed at all.

This was noticed in a failed test, where upgrade was running, eventhough
the job was executed as a nornal non-upgrade one.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-04-20 17:34:00 +00:00
Humble Chirammal
fcd0f4713a cleanup: correct typos in test description and source code
this commit correct typos in various places.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-04-18 10:29:08 +00:00
Humble Chirammal
9b8bcbd874 e2e: correct the cephfs fuse verification podnames
The podnames were wrongly mention in the e2e tests and this correct
the same.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-04-11 12:15:48 +00:00
Robert Vasek
548a752ff0 e2e: added test for verifying that ceph-fuse recovery works for new pods
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-03-10 06:05:52 +00:00
Niels de Vos
26696b4979 e2e: retry deleting Rook artifacts in case of error
On occasion deploying CephFS components fail due to errors like these:

    failed to delete provisioner rbac .../csi-provisioner-rbac.yaml

By using the deleteResource() helper, an retry is done in case of a
failure.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-02-15 16:21:07 +00:00
Madhu Rajanna
aba6979d29 cleanup: use os.ReadFile to read file
as ioutil.ReadFile is deprecated and
suggestion is to use os.ReadFile as
per https://pkg.go.dev/io/ioutil updating
the same.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-01-24 05:25:11 +00:00