Skip to content

Commit a0ced3d

Browse files
shyamradhakrishnanjoekr
authored andcommitted
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 18731f2 commit a0ced3d

18 files changed

+811
-22
lines changed

api/v1beta1/types.go

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

952994
// 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

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

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

0 commit comments

Comments
 (0)