Commit Graph

16 Commits

Author SHA1 Message Date
Roman Bednar
8567eafa02 add anti-capability to allow resize test skipping 2023-02-27 10:47:02 +01:00
Patrick Ohly
db394db398 e2e: move several timeouts from TestContext into TimeoutContext
This consolidates timeout handling. In the future, configuration of all
timeouts via a configuration file might get added. For now, the same three
legacy command line flags for the timeouts that get moved continue to be
supported.
2023-01-09 17:29:35 +01:00
Patrick Ohly
2f6c4f5eab e2e: use Ginkgo context
All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
2022-12-16 20:14:04 +01:00
Kubernetes Prow Robot
0a08757181
Merge pull request #113128 from pohly/e2e-storage-cleanup
e2e storage: cleanup with context
2022-10-20 10:29:00 -07:00
Patrick Ohly
d8d3dc9476 e2e storage: eliminate explicit test driver cleanup
Cleanup can be handled inside the setup code with ginkgo.DeferCleanup. This
simplifies the code.
2022-10-20 13:56:59 +02:00
Jan Safranek
bda42b6b53 Add capability for tests with multiple PVs with the same VolumeHandle
Some CSI drivers do not like multiple PVs with the same VolumeHandle,
therefore make that tests optional.
2022-10-18 13:44:54 +02:00
Chris Henzie
f6d9c27722 e2e test for ReadWriteOncePod PV access mode
Adds two tests for the enforcement of the ReadWriteOncePod
PersistentVolume access mode.

1. Tests that when two Pods are scheduled that reference the same
   ReadWriteOncePod PVC, the latter-scheduled Pod will be marked
   unschedulable because the PVC is in-use.
2. Tests that when two Pods are scheduled on the same node (setting
   Pod.Spec.NodeName to bypass scheduling for the second Pod), the
   latter Pod will fail to start because the PVC is already mounted on
   the Node.

Included are changes to update the hostpath CSI driver to accept new CSI
access modes. Its sidecar containers are already at supported versions
for ReadWriteOncePod and don't need updating. The GCP PD CSI driver does
not yet support the new CSI access modes, but its sidecar containers are
at supported versions and so the feature will work.

To support ReadWriteOncePod, the following CSI sidecars must be updated
to these versions or greater:
 - csi-provisioner:v3.0.0+
 - csi-attacher:v3.3.0+
 - csi-resizer:v1.3.0+

For more details, see:
https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/2485-read-write-once-pod-pv-access-mode/README.md
2022-10-14 09:15:36 -07:00
Jonathan Dobson
f369b1234a e2e: add storage capability for offline volume expansion 2022-04-21 14:49:18 -06:00
Cheng Xing
4836fd1510 Skip OnRootMismatch tests if the CSI driver supports VOLUME_MOUNT_GROUP. 2021-11-12 18:27:22 -08:00
Hemant Kumar
95c8b02096 Add explicit capability for online volume expansion 2021-06-07 13:43:18 -04:00
Kubernetes Prow Robot
2eb6911e83
Merge pull request #94334 from RaunakShah/volume_provision_perf
Add e2e test to validate performance metrics of volume lifecycle operations
2021-03-24 23:47:29 -07:00
Patrick Ohly
d7a086ddd8 storage e2e: simplify CSIStorageCapacity test
We can support topology detection for all drivers with a single
topology key by allowing different nodes to have the same topology
value. This makes the test a bit more generic and its configuration
simpler.
2021-03-24 22:31:43 +01:00
shahra
34e4a5f22c Add e2e test to validate performance metrics of volume lifecycle operations.
This test currently validates latency and throughput of volume
provisioning against a high baseline.
2021-03-24 13:50:32 -07:00
Patrick Ohly
b9b5d13b6d storage e2e: verify CSIStorageCapacity publishing
Drivers need to opt into the new test. Depending on how the driver
describes its behavior, the check can be more specific. Currently it
distinguishes between getting any kind of information about the
storage class (i.e. assuming that capacity is not exhausted) and
getting one object per node (for local storage). Discovering nodes
only works for CSI drivers.

The immediate usage of this new test is for csi-driver-host-path with
the deployment for distributed provisioning and storage capacity
tracking. Periodic kubernetes-csi Prow and pre-merge jobs can run this
test.

The alternative would have been to write a test that manages the
deployment of the csi-driver-host-path driver itself, i.e. use the E2E
manifests. But that would have implied duplicating the
deployments (in-tree and in csi-driver-host-path) and then changing
kubernetes-csi Prow jobs to somehow run for in-tree driver definition
with newer components, something that currently isn't done. The test
then also wouldn't be applicable to out-of-tree driver deployments.

Yet another alternative would be to create a separate E2E test suite
either in csi-driver-host-path or external-provisioner. The advantage
of such an approach is that the test can be written exactly for the
expected behavior of a deployment and thus be more precise than the
generic version of the test in k/k. But this again wouldn't be
reusable for other drivers and also a lot of work to set up as no such
E2E test suite currently exists.
2021-03-24 18:18:27 +01:00
Manohar Reddy
a6ec62f76d add e2e tests for DeleteSnapshotsecrets 2021-02-04 10:46:00 +05:30
Jiawei Wang
356bea6c9f Add storage framework and address comments 2020-12-10 22:48:06 -08:00