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 [email protected]

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

@github-actions github-actions bot requested review from jenting and zubron November 18, 2021 18:16
@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 <[email protected]>
@Box-Cube Box-Cube requested a review from reasonerjt November 28, 2021 11:27
@Box-Cube Box-Cube requested a review from ywk253100 December 2, 2021 07:55
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?

@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
@Box-Cube Box-Cube requested a review from ywk253100 December 15, 2021 01:22
@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 <[email protected]>

* Fix (vmware-tanzu#4373)

Signed-off-by: Box-Cube <[email protected]>

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

Signed-off-by: Box-Cube <[email protected]>

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

Signed-off-by: Box-Cube <[email protected]>

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

Signed-off-by: Box-Cube <[email protected]>

* Change the isStorageClassExist logic

Signed-off-by: Box-Cube <[email protected]>

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

Signed-off-by: Box-Cube <[email protected]>
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 <[email protected]>

* Fix (vmware-tanzu#4373)

Signed-off-by: Box-Cube <[email protected]>

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

Signed-off-by: Box-Cube <[email protected]>

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

Signed-off-by: Box-Cube <[email protected]>

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

Signed-off-by: Box-Cube <[email protected]>

* Change the isStorageClassExist logic

Signed-off-by: Box-Cube <[email protected]>

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

Signed-off-by: Box-Cube <[email protected]>
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