Skip to content

Commit

Permalink
Add vpc_service_profile
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
  • Loading branch information
wenqiq committed Jul 9, 2024
1 parent f43cab8 commit 6f568f6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build/yaml/crd/nsx.vmware.com_vpcnetworkconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ spec:
description: VpcConnectivityProfile ID. This profile has configuration
related to create VPC transit gateway attachment.
type: string
vpcServiceProfile:
description: The path of the configuration profile of the VPC services.
This will be an collection of default dhcp and subnet profiles.
The default vpc service profile will be created as part of new project
create workflow. That will be used as the default for all VPC created
under that project. The default value will be project specific default
VPC profile.
type: string
type: object
status:
description: VPCNetworkConfigurationStatus defines the observed state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ type VPCNetworkConfigurationSpec struct {
// VpcConnectivityProfile ID. This profile has configuration related to create VPC transit gateway attachment.
VpcConnectivityProfile string `json:"vpcConnectivityProfile,omitempty"`

// The path of the configuration profile of the VPC services. This will be an collection of default dhcp and subnet profiles. The default vpc service profile will be created as part of new project create workflow. That will be used as the default for all VPC created under that project. The default value will be project specific default VPC profile.
VpcServiceProfile string `json:"vpcServiceProfile,omitempty"`

// Private IPs.
PrivateIPs []string `json:"privateIPs,omitempty"`

Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/v1alpha1/vpcnetworkconfiguration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ type VPCNetworkConfigurationSpec struct {
// VpcConnectivityProfile ID. This profile has configuration related to create VPC transit gateway attachment.
VpcConnectivityProfile string `json:"vpcConnectivityProfile,omitempty"`

// The path of the configuration profile of the VPC services. This will be an collection of default dhcp and subnet profiles. The default vpc service profile will be created as part of new project create workflow. That will be used as the default for all VPC created under that project. The default value will be project specific default VPC profile.
VpcServiceProfile string `json:"vpcServiceProfile,omitempty"`

// Private IPs.
PrivateIPs []string `json:"privateIPs,omitempty"`

Expand Down
1 change: 1 addition & 0 deletions pkg/controllers/networkinfo/vpcnetworkconfig_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func buildNetworkConfigInfo(vpcConfigCR v1alpha1.VPCNetworkConfiguration) (*comm
Org: org,
Name: vpcConfigCR.Name,
VpcConnectivityProfile: vpcConfigCR.Spec.VpcConnectivityProfile,
VpcServiceProfile: vpcConfigCR.Spec.VpcServiceProfile,
LbServiceSize: vpcConfigCR.Spec.LbServiceSize,
NsxProject: project,
PrivateIPs: vpcConfigCR.Spec.PrivateIPs,
Expand Down
1 change: 1 addition & 0 deletions pkg/nsx/services/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ type VPCNetworkConfigInfo struct {
Org string
Name string
VpcConnectivityProfile string
VpcServiceProfile string
LbServiceSize string
NsxProject string
ExternalIPv4Blocks []string
Expand Down
1 change: 1 addition & 0 deletions pkg/nsx/services/vpc/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func buildNSXVPC(obj *v1alpha1.NetworkInfo, nsObj *v1.Namespace, nc common.VPCNe
}

vpc.VpcConnectivityProfile = &nc.VpcConnectivityProfile
vpc.VpcServiceProfile = &nc.VpcServiceProfile

vpc.PrivateIps = nc.PrivateIPs
if nc.ShortID != "" {
Expand Down

0 comments on commit 6f568f6

Please sign in to comment.