-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[fix] Add regional PV support for GKE #4680
Conversation
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>
pkg/backup/item_backupper_test.go
Outdated
@@ -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 |
There was a problem hiding this comment.
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.
pkg/backup/item_backupper.go
Outdated
@@ -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 = "__" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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>
782982f
to
4c8d1c2
Compare
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:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.