Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq committed Aug 9, 2024
1 parent dd55c2c commit e8f54f4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions build/yaml/samples/nsx_v1alpha1_vpcnetworkconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ kind: VPCNetworkConfiguration
metadata:
name: vpc-network-config1
spec:
defaultGatewayPath: /infra/tier-0s/t0
edgeClusterPath: /infra/sites/default/enforcement-points/default/edge-clusters/2d9df59f-6dc6-4911-8865-21fadc23d4da
defaultSubnetSize: 32
nsxProject: proj-1
externalIPv4Blocks:
- block1
privateIPs:
- 172.26.0.0/16
- 172.36.0.0/16
Expand Down
2 changes: 1 addition & 1 deletion pkg/nsx/services/vpc/vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (s *VPCService) GetVPCNetworkConfigByNamespace(ns string) *common.VPCNetwor
// TBD: for now, if network config info do not contains private cidr, we consider this is
// incorrect configuration, and skip creating this VPC CR
func (s *VPCService) ValidateNetworkConfig(nc common.VPCNetworkConfigInfo) bool {
return true
return nc.PrivateIPs != nil && len(nc.PrivateIPs) != 0
}

// InitializeVPC sync NSX resources
Expand Down

0 comments on commit e8f54f4

Please sign in to comment.