vmware-tanzu / velero-plugin-for-vsphere

Plugin to support Velero on vSphere
Other
59 stars 49 forks source link

Add updated NSX Operator CRDs #591

Closed ihgann closed 2 months ago

ihgann commented 2 months ago

What this PR does / why we need it:

This change addresses some updates to NSX Operator CRDs. NSX Operator has updated their API Group from "nsx.vmware.com" to "crd.nsx.vmware.com" for a handful of their CRDs - particularly related to VPCs. Additionally, a few CRDs have been removed/added. These CRDs are yet to be released, so there is no breaking change here.

NSX T1-based CRDs are unchanged.

Which issue(s) this PR fixes:

n/a

Special notes for your reviewer:

n/a

Does this PR introduce a user-facing change?:

This change updates the blocked NSX Operator CRDs to point to their new API Group, `crd.nsx.vmware.com`, and reconciles all new CRDs being pushed by NSX Operator.

Testing Done

Setup

I deployed a Supervisor with NSX VPC. I created a namespace with corresponding resources updated in this ConfigMap. Additionally, subnetsets.crd.nsx.vmware.com and networkinfos.crd.nsx.vmware.com are already present by default. Finally, I installed Velero with this custom Velero vSphere Plugin.

Tests

$ kubectl -n velero get configmap velero-vsphere-plugin-blocked-resources-list -o yaml | grep "crd.nsx.vmware.com"
  addressbindings.crd.nsx.vmware.com: "true"
  ipaddressallocations.crd.nsx.vmware.com: "true"
  ipblocksinfos.crd.nsx.vmware.com: "true"
  networkinfos.crd.nsx.vmware.com: "true"
  securitypolicies.crd.nsx.vmware.com: "true"
  staticroutes.crd.nsx.vmware.com: "true"
  subnetports.crd.nsx.vmware.com: "true"
  subnets.crd.nsx.vmware.com: "true"
  subnetsets.crd.nsx.vmware.com: "true"
  vpcnetworkconfigurations.crd.nsx.vmware.com: "true"
Errors:
...
             name: /pod-default message: /Error backing up item error: /error executing custom action (groupResource=subnetsets.crd.nsx.vmware.com, namespace=popularimages-ns, name=pod-default): rpc error: code = Unknown desc = Resource CRD subnetsets.crd.nsx.vmware.com is blocked in backup, skipping
...

Logs also indicated this:

time="2024-09-17T16:38:26Z" level=info msg="Backing up resource subnetsets.crd.nsx.vmware.com: blocked = true" backup=velero/backup cmd=/plugins/velero-plugin-for-vsphere logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/plugin/backup_pvc_action_plugin.go:66" pluginName=velero-plugin-for-vsphere
time="2024-09-17T16:38:26Z" level=error msg="Error backing up item" backup=velero/backup error="error executing custom action (groupResource=subnetsets.crd.nsx.vmware.com, namespace=popularimages-ns, name=vm-default): rpc error: code = Unknown desc = Resource CRD subnetsets.crd.nsx.vmware.com is blocked in backup, skipping" error.file="/go/src/github.com/vmware-tanzu/velero/pkg/backup/item_backupper.go:380" error.function="github.com/vmware-tanzu/velero/pkg/backup.(*itemBackupper).executeActions" logSource="pkg/backup/backup.go:461" name=vm-default
xing-yang commented 2 months ago

Can you add a release note?