Skip to content

Commit d5d6800

Browse files
Fix webhook errors and add params to NLB (#374)
* Fix the label in CRD for versions and add more parameters to NLB spec
1 parent 9b214a5 commit d5d6800

15 files changed

+801
-9
lines changed

api/v1beta1/types.go

+42
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,48 @@ type LoadBalancer struct {
953953
// ID of Load Balancer.
954954
// +optional
955955
LoadBalancerId *string `json:"loadBalancerId,omitempty"`
956+
957+
// The NLB Spec
958+
// +optional
959+
NLBSpec NLBSpec `json:"nlbSpec,omitempty"`
960+
}
961+
962+
// NLBSpec specifies the NLB spec.
963+
type NLBSpec struct {
964+
// BackendSetDetails specifies the configuration of a network load balancer backend set.
965+
// +optional
966+
BackendSetDetails BackendSetDetails `json:"backendSetDetails,omitempty"`
967+
}
968+
969+
// BackendSetDetails specifies the configuration of a network load balancer backend set.
970+
type BackendSetDetails struct {
971+
// If this parameter is enabled, then the network load balancer preserves the source IP of the packet when it is forwarded to backends.
972+
// Backends see the original source IP. If the isPreserveSourceDestination parameter is enabled for the network load balancer resource, then this parameter cannot be disabled.
973+
// The value is false by default.
974+
// +optional
975+
IsPreserveSource *bool `json:"isPreserveSource,omitempty"`
976+
977+
// If enabled, the network load balancer will continue to distribute traffic in the configured distribution in the event all backends are unhealthy.
978+
// The value is false by default.
979+
// +optional
980+
IsFailOpen *bool `json:"isFailOpen,omitempty"`
981+
982+
// If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy.
983+
// +optional
984+
IsInstantFailoverEnabled *bool `json:"isInstantFailoverEnabled,omitempty"`
985+
// If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy.
986+
// +optional
987+
HealthChecker HealthChecker `json:"healthChecker,omitempty"`
988+
}
989+
990+
// HealthChecker The health check policy configuration.
991+
// For more information, see Editing Health Check Policies (https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/HealthCheckPolicies/health-check-policy-management.htm).
992+
type HealthChecker struct {
993+
994+
// The path against which to run the health check.
995+
// Example: `/healthcheck`
996+
// Default value is `/healthz`
997+
UrlPath *string `json:"urlPath,omitempty"`
956998
}
957999

9581000
// NetworkSpec specifies what the OCI networking resources should look like.

api/v1beta1/zz_generated.conversion.go

+110
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta1/zz_generated.deepcopy.go

+68
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta2/types.go

+43
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,49 @@ type LoadBalancer struct {
961961
// Type of Load Balancer: NLB (default) or LBaaS.
962962
// +optional
963963
LoadBalancerType LoadBalancerType `json:"loadBalancerType,omitempty"`
964+
965+
// The NLB Spec
966+
// +optional
967+
NLBSpec NLBSpec `json:"nlbSpec,omitempty"`
968+
}
969+
970+
// NLBSpec specifies the NLB spec.
971+
type NLBSpec struct {
972+
// BackendSetDetails specifies the configuration of a network load balancer backend set.
973+
// +optional
974+
BackendSetDetails BackendSetDetails `json:"backendSetDetails,omitempty"`
975+
}
976+
977+
// BackendSetDetails specifies the configuration of a network load balancer backend set.
978+
type BackendSetDetails struct {
979+
// If this parameter is enabled, then the network load balancer preserves the source IP of the packet when it is forwarded to backends.
980+
// Backends see the original source IP. If the isPreserveSourceDestination parameter is enabled for the network load balancer resource, then this parameter cannot be disabled.
981+
// The value is false by default.
982+
// +optional
983+
IsPreserveSource *bool `json:"isPreserveSource,omitempty"`
984+
985+
// If enabled, the network load balancer will continue to distribute traffic in the configured distribution in the event all backends are unhealthy.
986+
// The value is false by default.
987+
// +optional
988+
IsFailOpen *bool `json:"isFailOpen,omitempty"`
989+
990+
// If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy.
991+
// +optional
992+
IsInstantFailoverEnabled *bool `json:"isInstantFailoverEnabled,omitempty"`
993+
994+
// If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy.
995+
// +optional
996+
HealthChecker HealthChecker `json:"healthChecker,omitempty"`
997+
}
998+
999+
// HealthChecker The health check policy configuration.
1000+
// For more information, see Editing Health Check Policies (https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/HealthCheckPolicies/health-check-policy-management.htm).
1001+
type HealthChecker struct {
1002+
1003+
// The path against which to run the health check.
1004+
// Example: `/healthcheck`
1005+
// Default value is `/healthz`
1006+
UrlPath *string `json:"urlPath,omitempty"`
9641007
}
9651008

9661009
// NetworkSpec specifies what the OCI networking resources should look like.

0 commit comments

Comments
 (0)