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 statefulsets volumeClaimTemplates storageClassName after use Changing PV/PVC Storage Classes #4375

Merged
merged 8 commits into from
Dec 16, 2021

Conversation

Box-Cube
Copy link
Contributor

@Box-Cube Box-Cube commented Nov 18, 2021

Signed-off-by: Box-Cube 64300761+Box-Cube@users.noreply.github.com

Thank you for contributing to Velero!

Please add a summary of your change

Change STS volumeClaimTemplates storageClassName to the new storageClass when using Changing PV/PVC Storage Classes function.

Does your change fix a particular issue?

Fixes #4373

Please indicate you've done the following:

  • Added handling StatefulSets volumeClaimTemplates storageClassName updated with the new storageClass
  • Added unit tests for change_storageclass_action_test.go

…ging PV/PVC Storage Classes

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
@Box-Cube Box-Cube changed the title fix statefulsets volumeClaimTemplates storageClassName after use Changing PV/PVC Storage Classes Fix statefulsets volumeClaimTemplates storageClassName after use Changing PV/PVC Storage Classes Nov 18, 2021
Copy link
Contributor

@reasonerjt reasonerjt left a comment

Choose a reason for hiding this comment

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

The change should be made in the plugin ChangeStorageClassAction, not in the restore flow

@Box-Cube
Copy link
Contributor Author

The change should be made in the plugin ChangeStorageClassAction, not in the restore flow

But ChangeStorageClassAction execute for the kind PersistentVolumeClaim object, It seems unlikely that the StatefulSet storageclassName can be changed in ChangeStorageClassAction.

@ywk253100
Copy link
Contributor

The change should be made in the plugin ChangeStorageClassAction, not in the restore flow

But ChangeStorageClassAction execute for the kind PersistentVolumeClaim object, It seems unlikely that the StatefulSet storageclassName can be changed in ChangeStorageClassAction.

We can extend the ChangeStorageClassAction to handle StatefulSet as well

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
ywk253100
ywk253100 previously approved these changes Dec 2, 2021
Copy link
Contributor

@ywk253100 ywk253100 left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@ywk253100 ywk253100 added this to the v1.8.0 milestone Dec 2, 2021
@ywk253100
Copy link
Contributor

@Box-Cube Could you please take a look at the CI checking failure?

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
@Box-Cube
Copy link
Contributor Author

@Box-Cube Could you please take a look at the CI checking failure?

The previous commit did not follow the community import format,now has been modified.

@Box-Cube Box-Cube reopened this Dec 15, 2021
@github-actions github-actions bot requested a review from sseago December 15, 2021 01:21
@reasonerjt reasonerjt dismissed their stale review December 16, 2021 06:48

Dismissing the request to change as the submitter has refined it based on my comment

@ywk253100 ywk253100 merged commit 69f6c8d into vmware-tanzu:main Dec 16, 2021
danfengliu pushed a commit to danfengliu/velero that referenced this pull request Jan 25, 2022
…ging PV/PVC Storage Classes (vmware-tanzu#4375)

* fix statefulsets volumeClaimTemplates storageClassName after use Changing PV/PVC Storage Classes

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix (vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Change the isStorageClassExist logic

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
gyaozhou pushed a commit to gyaozhou/velero-read that referenced this pull request May 14, 2022
…ging PV/PVC Storage Classes (vmware-tanzu#4375)

* fix statefulsets volumeClaimTemplates storageClassName after use Changing PV/PVC Storage Classes

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix (vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Change the isStorageClassExist logic

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
thomasmhofmann added a commit to thomasmhofmann/cloud-at-home that referenced this pull request May 30, 2022
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.

volumeClaimTemplates storageClassName in statefulsets incorrect after use Changing PV/PVC Storage Classes .
4 participants