Skip to content

Commit

Permalink
Update field name
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq committed Jul 18, 2024
1 parent 3028d3b commit f4c401d
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions build/yaml/crd/nsx.vmware.com_subnets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ spec:
type: boolean
type: object
accessMode:
default: Private
default: Private_TGW
description: Access mode of Subnet, accessible only from within VPC
or from outside VPC.
enum:
- Private
- Private_TGW
- Public
- Project
type: string
Expand Down
4 changes: 2 additions & 2 deletions build/yaml/crd/nsx.vmware.com_subnetsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ spec:
type: boolean
type: object
accessMode:
default: Private
default: Private_TGW
description: Access mode of Subnet, accessible only from within VPC
or from outside VPC.
enum:
- Private
- Private_TGW
- Public
- Project
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
Must be Public or Private.
enum:
- Public
- Private
- Private_TGW
- Project
type: string
privateIPs:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/nsx.vmware.com/v1alpha1/subnet_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type SubnetSpec struct {
IPv4SubnetSize int `json:"ipv4SubnetSize,omitempty"`
// Access mode of Subnet, accessible only from within VPC or from outside VPC.
// +kubebuilder:default:=Private
// +kubebuilder:validation:Enum=Private;Public;Project
// +kubebuilder:validation:Enum=Private;Public;PrivateTGW
AccessMode AccessMode `json:"accessMode,omitempty"`
// Subnet CIDRS.
// +kubebuilder:validation:MinItems=0
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/nsx.vmware.com/v1alpha1/subnetset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type SubnetSetSpec struct {
IPv4SubnetSize int `json:"ipv4SubnetSize,omitempty"`
// Access mode of Subnet, accessible only from within VPC or from outside VPC.
// +kubebuilder:default:=Private
// +kubebuilder:validation:Enum=Private;Public;Project
// +kubebuilder:validation:Enum=Private;Public;PrivateTGW
AccessMode AccessMode `json:"accessMode,omitempty"`
// Subnet advanced configuration.
AdvancedConfig AdvancedConfig `json:"advancedConfig,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
)

const (
AccessModePublic string = "Public"
AccessModePrivate string = "Private"
AccessModeProject string = "Project"
LbServiceSizeSmall string = "SMALL"
LbServiceSizeMedium string = "MEDIUM"
LbServiceSizeLarge string = "LARGE"
LbServiceSizeXlarge string = "XLARGE"
AccessModePublic string = "Public"
AccessModePrivate string = "Private"
AccessModeProject string = "PrivateTGW"
LoadBalancerSizeSmall string = "SMALL"
LoadBalancerSizeMedium string = "MEDIUM"
LoadBalancerSizeLarge string = "LARGE"
LoadBalancerSizeXlarge string = "XLARGE"
)

// VPCNetworkConfigurationSpec defines the desired state of VPCNetworkConfiguration.
Expand Down Expand Up @@ -49,15 +49,15 @@ type VPCNetworkConfigurationSpec struct {
VPC string `json:"vpc,omitempty"`

// +kubebuilder:validation:Enum=SMALL;MEDIUM;LARGE;XLARGE
LbServiceSize string `json:"lbServiceSize,omitempty"`
LoadBalancerSize string `json:"lbServiceSize,omitempty"`

// Default size of Subnet based upon estimated workload count.
// Defaults to 26.
// +kubebuilder:default=26
DefaultSubnetSize int `json:"defaultSubnetSize,omitempty"`
// PodSubnetAccessMode defines the access mode of the default SubnetSet for PodVM.
// Must be Public or Private.
// +kubebuilder:validation:Enum=Public;Private;Project
// +kubebuilder:validation:Enum=Public;Private;PrivateTGW
PodSubnetAccessMode string `json:"podSubnetAccessMode,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/v1alpha1/subnet_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type SubnetSpec struct {
IPv4SubnetSize int `json:"ipv4SubnetSize,omitempty"`
// Access mode of Subnet, accessible only from within VPC or from outside VPC.
// +kubebuilder:default:=Private
// +kubebuilder:validation:Enum=Private;Public;Project
// +kubebuilder:validation:Enum=Private;Public;PrivateTGW
AccessMode AccessMode `json:"accessMode,omitempty"`
// Subnet CIDRS.
// +kubebuilder:validation:MinItems=0
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/v1alpha1/subnetset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type SubnetSetSpec struct {
IPv4SubnetSize int `json:"ipv4SubnetSize,omitempty"`
// Access mode of Subnet, accessible only from within VPC or from outside VPC.
// +kubebuilder:default:=Private
// +kubebuilder:validation:Enum=Private;Public;Project
// +kubebuilder:validation:Enum=Private;Public;PrivateTGW
AccessMode AccessMode `json:"accessMode,omitempty"`
// Subnet advanced configuration.
AdvancedConfig AdvancedConfig `json:"advancedConfig,omitempty"`
Expand Down
18 changes: 9 additions & 9 deletions pkg/apis/v1alpha1/vpcnetworkconfiguration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
)

const (
AccessModePublic string = "Public"
AccessModePrivate string = "Private"
AccessModeProject string = "Project"
LbServiceSizeSmall string = "SMALL"
LbServiceSizeMedium string = "MEDIUM"
LbServiceSizeLarge string = "LARGE"
LbServiceSizeXlarge string = "XLARGE"
AccessModePublic string = "Public"
AccessModePrivate string = "Private"
AccessModeProject string = "PrivateTGW"
LoadBalancerSizeSmall string = "SMALL"
LoadBalancerSizeMedium string = "MEDIUM"
LoadBalancerSizeLarge string = "LARGE"
LoadBalancerSizeXlarge string = "XLARGE"
)

// VPCNetworkConfigurationSpec defines the desired state of VPCNetworkConfiguration.
Expand Down Expand Up @@ -49,15 +49,15 @@ type VPCNetworkConfigurationSpec struct {
VPC string `json:"vpc,omitempty"`

// +kubebuilder:validation:Enum=SMALL;MEDIUM;LARGE;XLARGE
LbServiceSize string `json:"lbServiceSize,omitempty"`
LoadBalancerSize string `json:"lbServiceSize,omitempty"`

// Default size of Subnet based upon estimated workload count.
// Defaults to 26.
// +kubebuilder:default=26
DefaultSubnetSize int `json:"defaultSubnetSize,omitempty"`
// PodSubnetAccessMode defines the access mode of the default SubnetSet for PodVM.
// Must be Public or Private.
// +kubebuilder:validation:Enum=Public;Private;Project
// +kubebuilder:validation:Enum=Public;Private;PrivateTGW
PodSubnetAccessMode string `json:"podSubnetAccessMode,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/networkinfo/vpcnetworkconfig_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func buildNetworkConfigInfo(vpcConfigCR v1alpha1.VPCNetworkConfiguration) (*comm
Name: vpcConfigCR.Name,
VpcConnectivityProfile: vpcConfigCR.Spec.VpcConnectivityProfile,
VpcServiceProfile: vpcConfigCR.Spec.VpcServiceProfile,
LbServiceSize: vpcConfigCR.Spec.LbServiceSize,
LoadBalancerSize: vpcConfigCR.Spec.LoadBalancerSize,
NsxProject: project,
PrivateIPs: vpcConfigCR.Spec.PrivateIPs,
DefaultSubnetSize: vpcConfigCR.Spec.DefaultSubnetSize,
Expand Down
2 changes: 1 addition & 1 deletion pkg/nsx/services/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ type VPCNetworkConfigInfo struct {
Name string
VpcConnectivityProfile string
VpcServiceProfile string
LbServiceSize string
LoadBalancerSize string
NsxProject string
ExternalIPv4Blocks []string
PrivateIPs []string
Expand Down

0 comments on commit f4c401d

Please sign in to comment.