Skip to content

Commit

Permalink
Omit NSX Operator VPC CRs from Supervisor Namespace Backup (vmware-ta…
Browse files Browse the repository at this point in the history
…nzu#582)

This change prevents Velero Backup from backing up the following NSX
Operator CRs to support the VPC topology, which can be found at
https://github.com/vmware-tanzu/nsx-operator/tree/main/pkg/apis.

Additionally, the following Pod annotations are stripped on backup,
as added via
https://github.com/vmware-tanzu/nsx-operator/blob/main/pkg/controllers/pod/pod_controller.go.

* nsx.vmware.com/attachment
* nsx.vmware.com/mac

Signed-off-by: Ian Gann <ian.gann@broadcom.com>
  • Loading branch information
ihgann authored Jun 14, 2024
1 parent 0d73abc commit 6fb650c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/supervisor-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ The default list of blocked resources in configmap is:
nsxlocks.nsx.vmware.com
nsxnetworkconfigurations.nsx.vmware.com
nsxnetworkinterfaces.nsx.vmware.com
vpcnetworkconfigurations.nsx.vmware.com
networkinfos.nsx.vmware.com
subnets.nsx.vmware.com
subnetsets.nsx.vmware.com
subnetports.nsx.vmware.com
staticroutes.nsx.vmware.com
ippools.nsx.vmware.com
securitypolicies.nsx.vmware.com
nsxserviceaccounts.nsx.vmware.com
orders.acme.cert-manager.io
persistenceinstanceinfoes.psp.wcp.vmware.com
persistenceserviceconfigurations.psp.wcp.vmware.com
Expand Down Expand Up @@ -140,6 +149,9 @@ The following resources are handled during the restore on the Supervisor Cluster
* vmware-system-image-references
* vmware-system-vm-moid
* vmware-system-vm-uuid
* vmware-system-network
* nsx.vmware.com/attachment
* nsx.vmware.com/mac

## vSphere Plugin resources

Expand Down
10 changes: 10 additions & 0 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,15 @@ var ResourcesToBlock = map[string]bool{
//"nsxloadbalancermonitors.vmware.com": true, // DO NOT ADD IT BACK
"nsxlocks.nsx.vmware.com": true,
"nsxnetworkinterfaces.nsx.vmware.com": true,
"vpcnetworkconfigurations.nsx.vmware.com": true,
"networkinfos.nsx.vmware.com": true,
"subnets.nsx.vmware.com": true,
"subnetsets.nsx.vmware.com": true,
"subnetports.nsx.vmware.com": true,
"staticroutes.nsx.vmware.com": true,
"securitypolicies.nsx.vmware.com": true,
"nsxnetworkconfigurations.nsx.vmware.com": true,
"nsxserviceaccounts.nsx.vmware.com": true,
"orders.acme.cert-manager.io": true,
"persistenceinstanceinfoes.psp.wcp.vmware.com": true,
"persistenceserviceconfigurations.psp.wcp.vmware.com": true,
Expand Down Expand Up @@ -360,6 +368,8 @@ var PodAnnotationsToSkip = map[string]bool{
"vmware-system-vm-moid": true,
"vmware-system-vm-uuid": true,
"vmware-system-network": true,
"nsx.vmware.com/attachment": true,
"nsx.vmware.com/mac": true,
}

// UUID of the VM on Supervisor Cluster
Expand Down

0 comments on commit 6fb650c

Please sign in to comment.