Skip to content

Commit

Permalink
[VPC] Add NSX LBS path to VPCInfo and use LB options in NsxConfig
Browse files Browse the repository at this point in the history
Signed-off-by: gran <gran@vmware.com>
  • Loading branch information
gran-vmv committed Jul 2, 2024
1 parent 4bc8285 commit 6522fff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/yaml/crd/nsx.vmware.com_vpcnetworkconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ spec:
name:
description: VPC name.
type: string
nsxlbspath:
description: NSXLBSPath is the NSX Policy path for the NSX LB
Service path.
type: string
required:
- name
type: object
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/v1alpha1/vpcnetworkconfiguration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ type VPCInfo struct {
Name string `json:"name"`
// AVISESubnetPath is the NSX Policy Path for the AVI SE Subnet.
AVISESubnetPath string `json:"lbSubnetPath,omitempty"`
// NSXLBSPath is the NSX Policy path for the NSX LB Service path.
NSXLBSPath string `json:"nsxlbspath,omitempty"`
}

// +genclient
Expand Down
11 changes: 11 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ const (
WebhookCertDir = "/tmp/k8s-webhook-server/serving-certs"
)

const (
LB_SERVICE_SIZE_SMALL = "SMALL"
LB_SERVICE_SIZE_MEDIUM = "MEDIUM"
LB_SERVICE_SIZE_LARGE = "LARGE"
LB_SERVICE_SIZE_XLARGE = "XLARGE"
)

var (
LogLevel int
ProbeAddr, MetricsAddr string
Expand Down Expand Up @@ -117,6 +124,10 @@ type NsxConfig struct {
EnvoyHost string `ini:"envoy_host"`
EnvoyPort int `ini:"envoy_port"`
LicenseValidationInterval int `ini:"license_validation_interval"`
UseAVILB bool `ini:"use_avi_lb"`
UseNativeLoadBalancer *bool `ini:"use_native_loadbalancer"`
RelaxScaleValidaion bool `ini:"relax_scale_validation"`
ServiceSize string `ini:"service_size"`
}

type K8sConfig struct {
Expand Down

0 comments on commit 6522fff

Please sign in to comment.