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

Keep the annotation "pv.kubernetes.io/provisioned-by" when restoring PVs #4391

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

ywk253100
Copy link
Contributor

More details please refer to #3470 (comment)

Fixes #3470

Signed-off-by: Wenkai Yin(尹文开) yinw@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:

@ywk253100 ywk253100 changed the title Don't remove the annotation "pv.kubernetes.io/provisioned-by" when storing PVs Keep the annotation "pv.kubernetes.io/provisioned-by" when storing PVs Nov 23, 2021
@ywk253100 ywk253100 changed the title Keep the annotation "pv.kubernetes.io/provisioned-by" when storing PVs Keep the annotation "pv.kubernetes.io/provisioned-by" when restoring PVs Nov 23, 2021
@@ -0,0 +1 @@
Keep the annotation "pv.kubernetes.io/provisioned-by" when storing PVs
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Keep the annotation "pv.kubernetes.io/provisioned-by" when storing PVs
Keep the annotation "pv.kubernetes.io/provisioned-by" when restoring PVs

@ywk253100
Copy link
Contributor Author

Tested on:

  • AKS
    • v1.19.11: only in-tree drivers are installed
    • v1.21.2: both in-tree and CSI drivers are installed, and the CSI SC is the default storage class
  • EKS
    • v1.18.20-eks-8c579e: only in-tree drivers are installed
    • v1.20.7-eks-d88609: only in-tree drivers are installed
  • vSphere
    • v1.21.2+vmware.1: only CSI drivers are installed

reasonerjt
reasonerjt previously approved these changes Dec 21, 2021
@@ -2989,15 +2989,15 @@ func Test_resetVolumeBindingInfo(t *testing.T) {
WithName("pv-1").WithAnnotations(
KubeAnnBindCompleted,
KubeAnnBoundByController,
KubeAnnDynamicallyProvisioned,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know why need this change that removing the const variable and use string instead.

More details please refer to vmware-tanzu#3470 (comment)

Fixes vmware-tanzu#3470

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
Copy link
Contributor

@jenting jenting left a comment

Choose a reason for hiding this comment

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

LGTM, thank you.

@reasonerjt reasonerjt merged commit 7c2dc14 into vmware-tanzu:main Dec 21, 2021
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.

PV is not getting cleaned up for the restored volumes
3 participants