Skip to content

Commit

Permalink
Fix webhook errors and add params to NLB (#374)
Browse files Browse the repository at this point in the history
* Fix the label in CRD for versions and add more parameters to NLB spec
  • Loading branch information
shyamradhakrishnan authored and joekr committed Oct 11, 2024
1 parent 18731f2 commit a0ced3d
Show file tree
Hide file tree
Showing 18 changed files with 811 additions and 22 deletions.
42 changes: 42 additions & 0 deletions api/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,48 @@ type LoadBalancer struct {
// ID of Load Balancer.
// +optional
LoadBalancerId *string `json:"loadBalancerId,omitempty"`

// The NLB Spec
// +optional
NLBSpec NLBSpec `json:"nlbSpec,omitempty"`
}

// NLBSpec specifies the NLB spec.
type NLBSpec struct {
// BackendSetDetails specifies the configuration of a network load balancer backend set.
// +optional
BackendSetDetails BackendSetDetails `json:"backendSetDetails,omitempty"`
}

// BackendSetDetails specifies the configuration of a network load balancer backend set.
type BackendSetDetails struct {
// If this parameter is enabled, then the network load balancer preserves the source IP of the packet when it is forwarded to backends.
// Backends see the original source IP. If the isPreserveSourceDestination parameter is enabled for the network load balancer resource, then this parameter cannot be disabled.
// The value is false by default.
// +optional
IsPreserveSource *bool `json:"isPreserveSource,omitempty"`

// If enabled, the network load balancer will continue to distribute traffic in the configured distribution in the event all backends are unhealthy.
// The value is false by default.
// +optional
IsFailOpen *bool `json:"isFailOpen,omitempty"`

// If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy.
// +optional
IsInstantFailoverEnabled *bool `json:"isInstantFailoverEnabled,omitempty"`
// If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy.
// +optional
HealthChecker HealthChecker `json:"healthChecker,omitempty"`
}

// HealthChecker The health check policy configuration.
// For more information, see Editing Health Check Policies (https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/HealthCheckPolicies/health-check-policy-management.htm).
type HealthChecker struct {

// The path against which to run the health check.
// Example: `/healthcheck`
// Default value is `/healthz`
UrlPath *string `json:"urlPath,omitempty"`
}

// NetworkSpec specifies what the OCI networking resources should look like.
Expand Down
110 changes: 110 additions & 0 deletions api/v1beta1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 72 additions & 6 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions api/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,49 @@ type LoadBalancer struct {
// Type of Load Balancer: NLB (default) or LBaaS.
// +optional
LoadBalancerType LoadBalancerType `json:"loadBalancerType,omitempty"`

// The NLB Spec
// +optional
NLBSpec NLBSpec `json:"nlbSpec,omitempty"`
}

// NLBSpec specifies the NLB spec.
type NLBSpec struct {
// BackendSetDetails specifies the configuration of a network load balancer backend set.
// +optional
BackendSetDetails BackendSetDetails `json:"backendSetDetails,omitempty"`
}

// BackendSetDetails specifies the configuration of a network load balancer backend set.
type BackendSetDetails struct {
// If this parameter is enabled, then the network load balancer preserves the source IP of the packet when it is forwarded to backends.
// Backends see the original source IP. If the isPreserveSourceDestination parameter is enabled for the network load balancer resource, then this parameter cannot be disabled.
// The value is false by default.
// +optional
IsPreserveSource *bool `json:"isPreserveSource,omitempty"`

// If enabled, the network load balancer will continue to distribute traffic in the configured distribution in the event all backends are unhealthy.
// The value is false by default.
// +optional
IsFailOpen *bool `json:"isFailOpen,omitempty"`

// If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy.
// +optional
IsInstantFailoverEnabled *bool `json:"isInstantFailoverEnabled,omitempty"`

// If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy.
// +optional
HealthChecker HealthChecker `json:"healthChecker,omitempty"`
}

// HealthChecker The health check policy configuration.
// For more information, see Editing Health Check Policies (https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/HealthCheckPolicies/health-check-policy-management.htm).
type HealthChecker struct {

// The path against which to run the health check.
// Example: `/healthcheck`
// Default value is `/healthz`
UrlPath *string `json:"urlPath,omitempty"`
}

// NetworkSpec specifies what the OCI networking resources should look like.
Expand Down
Loading

0 comments on commit a0ced3d

Please sign in to comment.