Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Add regional PV support for GKE #4680

Merged

Conversation

blackpiglet
Copy link
Contributor

fix #4663.
For GKE pv, when create backup, return all zones retrived from node affinity.

Signed-off-by: Xun Jiang jxun@vmware.com

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #(issue)

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

fix vmware-tanzu#4663.
For GKE pv, when create backup, return all zones retrived from node affinity.

Signed-off-by: Xun Jiang <jxun@vmware.com>
@@ -131,6 +131,21 @@ func Test_zoneFromPVNodeAffinity(t *testing.T) {
wantKey: "topology.disk.csi.azure.com/zone",
wantValue: "us-central",
},
{
name: "Volume with multiple valid keys, and provider is gke, returns the all match", // it should never happen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is misleading, instead you should provide the concrete use case when testing the regional disk?

It does not retuan all match, in your tc us-east-2b is dropped.

@@ -384,6 +385,7 @@ const (
awsEbsCsiZoneKey = "topology.ebs.csi.aws.com/zone"
azureCsiZoneKey = "topology.disk.csi.azure.com/zone"
gkeCsiZoneKey = "topology.gke.io/zone"
zoneSeparator = "__"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the zone separator for gcp only or all cloud providers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GKE only. I will update

1. rename zoneSeparator to gkeZoneSeparator
2. add example of regional PV's node affinity. modify test case description.

Signed-off-by: Xun Jiang <jxun@vmware.com>
@jenting jenting removed their request for review February 22, 2022 08:26
@ywk253100 ywk253100 merged commit 8e1ba3e into vmware-tanzu:main Feb 22, 2022
@blackpiglet blackpiglet deleted the 4663-add-regional-disk-support branch October 15, 2022 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

velero-plugin-for-gcp v1.4.0 regional storage class: Error attempting to get volume ID for persistent volume
3 participants