vmware-tanzu / velero-plugin-for-vsphere

Plugin to support Velero on vSphere
Other
58 stars 50 forks source link

Omit NSX Operator VPC CRs from Backup #582

Closed ihgann closed 3 weeks ago

ihgann commented 3 weeks ago

What this PR does / why we need it:

This change supports addition of NSX Operator v1alpha1 APIs to be omitted from Velero backups. These resources are being introduced into Supervisor, and must be omitted in order to support an accurate restore, as networking resources are generated dynamically and these networking resources and rules associated with them (such as securitypolicies) might not accurately reflect the original backup anymore.

Additionally, removes a few annotations from being backed up on vSphere pods related to NSX VPC networking.

Which issue(s) this PR fixes:

n/a

Special notes for your reviewer:

n/a

Does this PR introduce a user-facing change?:

For Supervisor's using NSX Operator with VPC Networking, Velero backups will omit all NSX Operator v1alpha1 VPC APIs. vSphere Pods, Services, and any other resource's networking-related properties will need to be re-created by NSX Operator upon restore.

Testing Done:

--

I also performed a manual negative test by testing main, in which the above backup did retain the NSX VPC CRs, which caused issue on restore as vSphere Pods and services were not able to successfully retain their previous networking and NSX Operator was not able to fully apply networking resources to the existing Pods.

deepakkinni commented 3 weeks ago

Can we get the DCO to pass?

xing-yang commented 3 weeks ago

Can you add a release note? When you run backup and restore, do you have to "exclude" any resources?

ihgann commented 3 weeks ago

Can you add a release note? When you run backup and restore, do you have to "exclude" any resources?

No additional exclusion is required to support backup/restore with these changes.