mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 23:19:26 +00:00
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
This commit is contained in:
@@ -148,6 +148,7 @@ func InitHostPathCSIDriver() storageframework.TestDriver {
|
||||
storageframework.CapOfflineExpansion: true,
|
||||
storageframework.CapOnlineExpansion: true,
|
||||
storageframework.CapSingleNodeVolume: true,
|
||||
storageframework.CapReadWriteOncePod: true,
|
||||
|
||||
// This is needed for the
|
||||
// testsuites/volumelimits.go `should support volume limits`
|
||||
@@ -805,6 +806,7 @@ func InitGcePDCSIDriver() storageframework.TestDriver {
|
||||
storageframework.CapOnlineExpansion: true,
|
||||
storageframework.CapNodeExpansion: true,
|
||||
storageframework.CapSnapshotDataSource: true,
|
||||
storageframework.CapReadWriteOncePod: true,
|
||||
},
|
||||
RequiredAccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce},
|
||||
TopologyKeys: []string{GCEPDCSIZoneTopologyKey},
|
||||
|
Reference in New Issue
Block a user