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

Add updated NSX Operator CRDs #591

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Conversation

ihgann
Copy link
Contributor

@ihgann ihgann commented Sep 16, 2024

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

  • Validated the velero-vsphere-plugin-blocked-resources-list successfully shows the resources I added in this PR.
$ 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"
  • Created a backup of a namespace with no manual exclusions. Validated that the resources in the backup show an error on the resources I added to be blocked (sample below), and that the --details view shows that no NSX CRDs are backed up.
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
  • Validated that restoring the resources did not create new NSX CRDs that were blocked from the backup.

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.

NSX T1-based CRDs are unchanged.

Signed-off-by: Ian Gann <[email protected]>
@xing-yang
Copy link
Contributor

Can you add a release note?

@xing-yang xing-yang merged commit ee18347 into vmware-tanzu:main Sep 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants