Skip to content

Commit

Permalink
Merge pull request vmware-tanzu#828 from seanpang-vmware/removeip
Browse files Browse the repository at this point in the history
Remove vpcPath from networkinfo CRD
  • Loading branch information
seanpang-vmware committed Nov 21, 2024
1 parent 0023677 commit 616d957
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
3 changes: 0 additions & 3 deletions build/yaml/crd/nsx.vmware.com_networkinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ spec:
items:
type: string
type: array
vpcPath:
description: NSX Policy path for VPC.
type: string
required:
- defaultSNATIP
- name
Expand Down
1 change: 0 additions & 1 deletion build/yaml/samples/nsx_v1alpha1_networkinfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ vpcs:
name: vpc-d110d5aa-006d-4b59-9caf-424a4fba932c--kube-system
privateIPv4CIDRs:
- 172.26.0.0/16
vpcPath: /orgs/default/projects/project-quality/vpcs/19a8a52e-beb0-4396-91ce-5821a15a43db
18 changes: 18 additions & 0 deletions pkg/controllers/networkinfo/networkinfo_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,24 @@ func (r *NetworkInfoReconciler) Reconcile(ctx context.Context, req ctrl.Request)
log.Info("finalizers cannot be recognized", "NetworkInfo", req.NamespacedName)
}
}

state := &v1alpha1.VPCState{
Name: *createdVpc.DisplayName,

Check failure on line 185 in pkg/controllers/networkinfo/networkinfo_controller.go

View workflow job for this annotation

GitHub Actions / build

undefined: createdVpc
DefaultSNATIP: snatIP,

Check failure on line 186 in pkg/controllers/networkinfo/networkinfo_controller.go

View workflow job for this annotation

GitHub Actions / build

undefined: snatIP
LoadBalancerIPAddresses: cidr,

Check failure on line 187 in pkg/controllers/networkinfo/networkinfo_controller.go

View workflow job for this annotation

GitHub Actions / build

undefined: cidr
PrivateIPs: privateIPs,

Check failure on line 188 in pkg/controllers/networkinfo/networkinfo_controller.go

View workflow job for this annotation

GitHub Actions / build

unknown field PrivateIPs in struct literal of type "github.com/vmware-tanzu/nsx-operator/pkg/apis/v1alpha1".VPCState

Check failure on line 188 in pkg/controllers/networkinfo/networkinfo_controller.go

View workflow job for this annotation

GitHub Actions / build

undefined: privateIPs
}

// AKO needs to know the AVI subnet path created by NSX
setVPCNetworkConfigurationStatusWithLBS(ctx, r.Client, ncName, state.Name, path, nsxLBSPath, *createdVpc.Path)

Check failure on line 192 in pkg/controllers/networkinfo/networkinfo_controller.go

View workflow job for this annotation

GitHub Actions / build

undefined: setVPCNetworkConfigurationStatusWithLBS

Check failure on line 192 in pkg/controllers/networkinfo/networkinfo_controller.go

View workflow job for this annotation

GitHub Actions / build

undefined: ncName

Check failure on line 192 in pkg/controllers/networkinfo/networkinfo_controller.go

View workflow job for this annotation

GitHub Actions / build

undefined: path

Check failure on line 192 in pkg/controllers/networkinfo/networkinfo_controller.go

View workflow job for this annotation

GitHub Actions / build

undefined: nsxLBSPath
r.StatusUpdater.UpdateSuccess(ctx, networkInfoCR, setNetworkInfoVPCStatus, state)

if retryWithSystemVPC {
setNSNetworkReadyCondition(ctx, r.Client, req.Namespace, systemNSCondition)
return common.ResultRequeueAfter60sec, nil
}

setNSNetworkReadyCondition(ctx, r.Client, req.Namespace, nsMsgVPCIsReady.getNSNetworkCondition())
return common.ResultNormal, nil
}

Expand Down

0 comments on commit 616d957

Please sign in to comment.