Skip to content

Commit

Permalink
Delete loadBalancerSize
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq committed Jul 24, 2024
1 parent f477523 commit 4c24291
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 41 deletions.
7 changes: 0 additions & 7 deletions build/yaml/crd/nsx.vmware.com_vpcnetworkconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ spec:
Default size of Subnets.
Defaults to 26.
type: integer
loadBalancerSize:
enum:
- Small
- Medium
- Large
- XLarge
type: string
nsxProject:
description: NSX Project the Namespace associated with.
type: string
Expand Down
25 changes: 9 additions & 16 deletions pkg/apis/nsx.vmware.com/v1alpha1/vpcnetworkconfiguration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import (
)

const (
AccessModePublic string = "Public"
AccessModePrivate string = "Private"
AccessModeProject string = "PrivateTGW"
LoadBalancerSizeSmall string = "Small"
LoadBalancerSizeMedium string = "Medium"
LoadBalancerSizeLarge string = "Large"
LoadBalancerSizeXLarge string = "XLarge"
AccessModePublic string = "Public"
AccessModePrivate string = "Private"
AccessModeProject string = "PrivateTGW"
)

// VPCNetworkConfigurationSpec defines the desired state of VPCNetworkConfiguration.
Expand All @@ -24,6 +20,12 @@ const (
// in a Namespace's VPCNetworkConfiguration, the Namespace will use the value
// in the default VPCNetworkConfiguration.
type VPCNetworkConfigurationSpec struct {
// NSX path of the VPC the Namespace associated with.
// If VPC is set, only defaultIPv4SubnetSize and defaultSubnetAccessMode
// take effect, other fields are ignored.
// +optional
VPC string `json:"vpc,omitempty"`

// NSX Project the Namespace associated with.
NSXProject string `json:"nsxProject,omitempty"`

Expand All @@ -39,15 +41,6 @@ type VPCNetworkConfigurationSpec struct {
// +optional
ShortID string `json:"shortID,omitempty"`

// NSX path of the VPC the Namespace associated with.
// If VPC is set, only defaultIPv4SubnetSize and defaultSubnetAccessMode
// take effect, other fields are ignored.
// +optional
VPC string `json:"vpc,omitempty"`

// +kubebuilder:validation:Enum=Small;Medium;Large;XLarge
LoadBalancerSize string `json:"loadBalancerSize,omitempty"`

// Default size of Subnets.
// Defaults to 26.
// +kubebuilder:default=26
Expand Down
25 changes: 9 additions & 16 deletions pkg/apis/v1alpha1/vpcnetworkconfiguration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import (
)

const (
AccessModePublic string = "Public"
AccessModePrivate string = "Private"
AccessModeProject string = "PrivateTGW"
LoadBalancerSizeSmall string = "Small"
LoadBalancerSizeMedium string = "Medium"
LoadBalancerSizeLarge string = "Large"
LoadBalancerSizeXLarge string = "XLarge"
AccessModePublic string = "Public"
AccessModePrivate string = "Private"
AccessModeProject string = "PrivateTGW"
)

// VPCNetworkConfigurationSpec defines the desired state of VPCNetworkConfiguration.
Expand All @@ -24,6 +20,12 @@ const (
// in a Namespace's VPCNetworkConfiguration, the Namespace will use the value
// in the default VPCNetworkConfiguration.
type VPCNetworkConfigurationSpec struct {
// NSX path of the VPC the Namespace associated with.
// If VPC is set, only defaultIPv4SubnetSize and defaultSubnetAccessMode
// take effect, other fields are ignored.
// +optional
VPC string `json:"vpc,omitempty"`

// NSX Project the Namespace associated with.
NSXProject string `json:"nsxProject,omitempty"`

Expand All @@ -39,15 +41,6 @@ type VPCNetworkConfigurationSpec struct {
// +optional
ShortID string `json:"shortID,omitempty"`

// NSX path of the VPC the Namespace associated with.
// If VPC is set, only defaultIPv4SubnetSize and defaultSubnetAccessMode
// take effect, other fields are ignored.
// +optional
VPC string `json:"vpc,omitempty"`

// +kubebuilder:validation:Enum=Small;Medium;Large;XLarge
LoadBalancerSize string `json:"loadBalancerSize,omitempty"`

// Default size of Subnets.
// Defaults to 26.
// +kubebuilder:default=26
Expand Down
1 change: 0 additions & 1 deletion pkg/controllers/networkinfo/vpcnetworkconfig_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ func buildNetworkConfigInfo(vpcConfigCR v1alpha1.VPCNetworkConfiguration) (*comm
Org: org,
Name: vpcConfigCR.Name,
VPCConnectivityProfile: vpcConfigCR.Spec.VPCConnectivityProfile,
LoadBalancerSize: vpcConfigCR.Spec.LoadBalancerSize,
NSXProject: project,
PrivateIPs: vpcConfigCR.Spec.PrivateIPs,
DefaultSubnetSize: vpcConfigCR.Spec.DefaultSubnetSize,
Expand Down
1 change: 0 additions & 1 deletion pkg/nsx/services/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ type VPCNetworkConfigInfo struct {
Org string
Name string
VPCConnectivityProfile string
LoadBalancerSize string
NSXProject string
ExternalIPv4Blocks []string
PrivateIPs []string
Expand Down

0 comments on commit 4c24291

Please sign in to comment.