kubernetes-sigs / gcp-compute-persistent-disk-csi-driver

The Google Compute Engine Persistent Disk (GCE PD) Container Storage Interface (CSI) Storage Plugin.
Apache License 2.0
163 stars 143 forks source link

Add support for "multi-zone" volume handle provisioning and deletion #1733

Closed pwschuurman closed 3 months ago

pwschuurman commented 4 months ago

What type of PR is this? /kind feature

What this PR does / why we need it: Add support for multi-zone volume handle provisioning. Volumes created with the enable-multi-zone-provisioning: true parameter will be created with multiple underlying disks, one per specified zone. The underlying volume returned will specify the keyword multi-zone in place of the zone field. See https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1616 for more details on the syntax. 1) If there are zones specified in the requisite topologies, one disk will be created per zone 2) If there are no zones specified in the requisite topologies, one disk will be created per zone in all zones in the driver's default region (where the particular disk type is supported).

Multi-zone volumes can be created from three sources: 1) PD images (ROX mode) 2) PD Snapshots (ROX mode) 3) Empty disks (RWO mode)

Deletion will inspect all disks that match the volume handle name, for all zones in the driver's default region.

Special notes for your reviewer:

This adds some additional e2e tests, that are not yet runnable, due to API support being in alpha. These have been run on a locally project that has alpha support, and can be replicated by running:

export RUN_MULTI_ZONE_TESTS=true
ginkgo --v "test/e2e/tests" -- --project "${PROJECT}" --service-account "${IAM_NAME}" --v=6 --logtostderr --ginkgo.focus "'multi-zone'" --extra-driver-flags=--set-access-mode-gce-api-version=alpha

Does this PR introduce a user-facing change?:

Add support for provisioning multi-zone volume handles
k8s-ci-robot commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pwschuurman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/blob/master/OWNERS)~~ [pwschuurman] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
mattcary commented 4 months ago

/assign @mattcary

pwschuurman commented 4 months ago

/retest

pwschuurman commented 4 months ago

/retest

msau42 commented 3 months ago

/lgtm