Skip to content

Commit d5d6800

Browse files
authoredAug 6, 2024··
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.

‎api/v1beta2/zz_generated.deepcopy.go

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

‎cloud/scope/network_load_balancer_reconciler.go

+15-4
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ func (s *ClusterScope) DeleteApiServerNLB(ctx context.Context) error {
9898
// NLBSpec builds the Network LoadBalancer from the ClusterScope and returns it
9999
func (s *ClusterScope) NLBSpec() infrastructurev1beta2.LoadBalancer {
100100
nlbSpec := infrastructurev1beta2.LoadBalancer{
101-
Name: s.GetControlPlaneLoadBalancerName(),
101+
Name: s.GetControlPlaneLoadBalancerName(),
102+
NLBSpec: s.OCIClusterAccessor.GetNetworkSpec().APIServerLB.NLBSpec,
102103
}
103104
return nlbSpec
104105
}
@@ -141,6 +142,10 @@ func (s *ClusterScope) UpdateNLB(ctx context.Context, nlb infrastructurev1beta2.
141142
// See https://docs.oracle.com/en-us/iaas/Content/NetworkLoadBalancer/overview.htm for more details on the Network
142143
// Load Balancer
143144
func (s *ClusterScope) CreateNLB(ctx context.Context, lb infrastructurev1beta2.LoadBalancer) (*string, *string, error) {
145+
isPreserverSourceIp := lb.NLBSpec.BackendSetDetails.IsPreserveSource
146+
if isPreserverSourceIp == nil {
147+
isPreserverSourceIp = common.Bool(false)
148+
}
144149
listenerDetails := make(map[string]networkloadbalancer.ListenerDetails)
145150
listenerDetails[APIServerLBListener] = networkloadbalancer.ListenerDetails{
146151
Protocol: networkloadbalancer.ListenerProtocolsTcp,
@@ -150,13 +155,19 @@ func (s *ClusterScope) CreateNLB(ctx context.Context, lb infrastructurev1beta2.L
150155
}
151156

152157
backendSetDetails := make(map[string]networkloadbalancer.BackendSetDetails)
158+
healthCheckUrl := lb.NLBSpec.BackendSetDetails.HealthChecker.UrlPath
159+
if healthCheckUrl == nil {
160+
healthCheckUrl = common.String("/healthz")
161+
}
153162
backendSetDetails[APIServerLBBackendSetName] = networkloadbalancer.BackendSetDetails{
154-
Policy: LoadBalancerPolicy,
155-
IsPreserveSource: common.Bool(false),
163+
Policy: LoadBalancerPolicy,
164+
IsPreserveSource: isPreserverSourceIp,
165+
IsFailOpen: lb.NLBSpec.BackendSetDetails.IsFailOpen,
166+
IsInstantFailoverEnabled: lb.NLBSpec.BackendSetDetails.IsInstantFailoverEnabled,
156167
HealthChecker: &networkloadbalancer.HealthChecker{
157168
Port: common.Int(int(s.APIServerPort())),
158169
Protocol: networkloadbalancer.HealthCheckProtocolsHttps,
159-
UrlPath: common.String("/healthz"),
170+
UrlPath: healthCheckUrl,
160171
ReturnCode: common.Int(200),
161172
},
162173
Backends: []networkloadbalancer.Backend{},

‎cloud/scope/network_load_balancer_reconciler_test.go

+112-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func TestNLBReconciliation(t *testing.T) {
245245
},
246246
},
247247
{
248-
name: "create network load balancer",
248+
name: "create network load balancer, default values",
249249
errorExpected: false,
250250
testSpecificSetup: func(clusterScope *ClusterScope, nlbClient *mock_nlb.MockNetworkLoadBalancerClient) {
251251
clusterScope.OCIClusterAccessor.GetNetworkSpec().Vcn.Subnets = []*infrastructurev1beta2.Subnet{
@@ -266,6 +266,7 @@ func TestNLBReconciliation(t *testing.T) {
266266
},
267267
},
268268
}
269+
clusterScope.OCIClusterAccessor.GetNetworkSpec().APIServerLB = infrastructurev1beta2.LoadBalancer{}
269270
definedTags, definedTagsInterface := getDefinedTags()
270271
ociClusterAccessor.OCICluster.Spec.DefinedTags = definedTags
271272
nlbClient.EXPECT().ListNetworkLoadBalancers(gomock.Any(), gomock.Eq(networkloadbalancer.ListNetworkLoadBalancersRequest{
@@ -340,6 +341,116 @@ func TestNLBReconciliation(t *testing.T) {
340341
}, nil)
341342
},
342343
},
344+
{
345+
name: "create network load balancer",
346+
errorExpected: false,
347+
testSpecificSetup: func(clusterScope *ClusterScope, nlbClient *mock_nlb.MockNetworkLoadBalancerClient) {
348+
clusterScope.OCIClusterAccessor.GetNetworkSpec().Vcn.Subnets = []*infrastructurev1beta2.Subnet{
349+
{
350+
Role: infrastructurev1beta2.ControlPlaneEndpointRole,
351+
ID: common.String("s1"),
352+
},
353+
}
354+
clusterScope.OCIClusterAccessor.GetNetworkSpec().Vcn.NetworkSecurityGroup = infrastructurev1beta2.NetworkSecurityGroup{
355+
List: []*infrastructurev1beta2.NSG{
356+
{
357+
Role: infrastructurev1beta2.ControlPlaneEndpointRole,
358+
ID: common.String("nsg1"),
359+
},
360+
{
361+
Role: infrastructurev1beta2.ControlPlaneEndpointRole,
362+
ID: common.String("nsg2"),
363+
},
364+
},
365+
}
366+
clusterScope.OCIClusterAccessor.GetNetworkSpec().APIServerLB = infrastructurev1beta2.LoadBalancer{
367+
NLBSpec: infrastructurev1beta2.NLBSpec{
368+
BackendSetDetails: infrastructurev1beta2.BackendSetDetails{
369+
IsInstantFailoverEnabled: common.Bool(true),
370+
IsFailOpen: common.Bool(false),
371+
IsPreserveSource: common.Bool(false),
372+
HealthChecker: infrastructurev1beta2.HealthChecker{
373+
UrlPath: common.String("readyz"),
374+
},
375+
},
376+
},
377+
}
378+
definedTags, definedTagsInterface := getDefinedTags()
379+
ociClusterAccessor.OCICluster.Spec.DefinedTags = definedTags
380+
nlbClient.EXPECT().ListNetworkLoadBalancers(gomock.Any(), gomock.Eq(networkloadbalancer.ListNetworkLoadBalancersRequest{
381+
CompartmentId: common.String("compartment-id"),
382+
DisplayName: common.String(fmt.Sprintf("%s-%s", "cluster", "apiserver")),
383+
})).
384+
Return(networkloadbalancer.ListNetworkLoadBalancersResponse{}, nil)
385+
nlbClient.EXPECT().CreateNetworkLoadBalancer(gomock.Any(), gomock.Eq(networkloadbalancer.CreateNetworkLoadBalancerRequest{
386+
CreateNetworkLoadBalancerDetails: networkloadbalancer.CreateNetworkLoadBalancerDetails{
387+
CompartmentId: common.String("compartment-id"),
388+
DisplayName: common.String(fmt.Sprintf("%s-%s", "cluster", "apiserver")),
389+
SubnetId: common.String("s1"),
390+
IsPrivate: common.Bool(false),
391+
NetworkSecurityGroupIds: []string{"nsg1", "nsg2"},
392+
Listeners: map[string]networkloadbalancer.ListenerDetails{
393+
APIServerLBListener: {
394+
Protocol: networkloadbalancer.ListenerProtocolsTcp,
395+
Port: common.Int(6443),
396+
DefaultBackendSetName: common.String(APIServerLBBackendSetName),
397+
Name: common.String(APIServerLBListener),
398+
},
399+
},
400+
BackendSets: map[string]networkloadbalancer.BackendSetDetails{
401+
APIServerLBBackendSetName: networkloadbalancer.BackendSetDetails{
402+
Policy: LoadBalancerPolicy,
403+
IsInstantFailoverEnabled: common.Bool(true),
404+
IsFailOpen: common.Bool(false),
405+
IsPreserveSource: common.Bool(false),
406+
HealthChecker: &networkloadbalancer.HealthChecker{
407+
Port: common.Int(6443),
408+
Protocol: networkloadbalancer.HealthCheckProtocolsHttps,
409+
UrlPath: common.String("readyz"),
410+
ReturnCode: common.Int(200),
411+
},
412+
Backends: []networkloadbalancer.Backend{},
413+
},
414+
},
415+
FreeformTags: tags,
416+
DefinedTags: definedTagsInterface,
417+
},
418+
OpcRetryToken: ociutil.GetOPCRetryToken("%s-%s", "create-nlb", string("resource_uid")),
419+
})).
420+
Return(networkloadbalancer.CreateNetworkLoadBalancerResponse{
421+
NetworkLoadBalancer: networkloadbalancer.NetworkLoadBalancer{
422+
Id: common.String("nlb-id"),
423+
},
424+
OpcWorkRequestId: common.String("opc-wr-id"),
425+
}, nil)
426+
nlbClient.EXPECT().GetWorkRequest(gomock.Any(), gomock.Eq(networkloadbalancer.GetWorkRequestRequest{
427+
WorkRequestId: common.String("opc-wr-id"),
428+
})).Return(networkloadbalancer.GetWorkRequestResponse{
429+
WorkRequest: networkloadbalancer.WorkRequest{
430+
Status: networkloadbalancer.OperationStatusSucceeded,
431+
},
432+
}, nil)
433+
434+
nlbClient.EXPECT().GetNetworkLoadBalancer(gomock.Any(), gomock.Eq(networkloadbalancer.GetNetworkLoadBalancerRequest{
435+
NetworkLoadBalancerId: common.String("nlb-id"),
436+
})).
437+
Return(networkloadbalancer.GetNetworkLoadBalancerResponse{
438+
NetworkLoadBalancer: networkloadbalancer.NetworkLoadBalancer{
439+
Id: common.String("nlb-id"),
440+
FreeformTags: tags,
441+
DefinedTags: make(map[string]map[string]interface{}),
442+
IsPrivate: common.Bool(false),
443+
DisplayName: common.String(fmt.Sprintf("%s-%s", "cluster", "apiserver")),
444+
IpAddresses: []networkloadbalancer.IpAddress{
445+
{
446+
IpAddress: common.String("2.2.2.2"),
447+
IsPublic: common.Bool(true),
448+
},
449+
},
450+
},
451+
}, nil)
452+
},
453+
},
343454
{
344455
name: "create network load balancer request fails",
345456
errorExpected: true,

‎config/crd/bases/infrastructure.cluster.x-k8s.io_ociclusters.yaml

+80
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,46 @@ spec:
117117
name:
118118
description: LoadBalancer Name.
119119
type: string
120+
nlbSpec:
121+
description: The NLB Spec
122+
properties:
123+
backendSetDetails:
124+
description: BackendSetDetails specifies the configuration
125+
of a network load balancer backend set.
126+
properties:
127+
healthChecker:
128+
description: If enabled existing connections will
129+
be forwarded to an alternative healthy backend as
130+
soon as current backend becomes unhealthy.
131+
properties:
132+
urlPath:
133+
description: 'The path against which to run the
134+
health check. Example: `/healthcheck` Default
135+
value is `/healthz`'
136+
type: string
137+
type: object
138+
isFailOpen:
139+
description: If enabled, the network load balancer
140+
will continue to distribute traffic in the configured
141+
distribution in the event all backends are unhealthy.
142+
The value is false by default.
143+
type: boolean
144+
isInstantFailoverEnabled:
145+
description: If enabled existing connections will
146+
be forwarded to an alternative healthy backend as
147+
soon as current backend becomes unhealthy.
148+
type: boolean
149+
isPreserveSource:
150+
description: If this parameter is enabled, then the
151+
network load balancer preserves the source IP of
152+
the packet when it is forwarded to backends. Backends
153+
see the original source IP. If the isPreserveSourceDestination
154+
parameter is enabled for the network load balancer
155+
resource, then this parameter cannot be disabled.
156+
The value is false by default.
157+
type: boolean
158+
type: object
159+
type: object
120160
type: object
121161
skipNetworkManagement:
122162
description: SkipNetworkManagement defines if the networking spec(VCN
@@ -1288,6 +1328,46 @@ spec:
12881328
name:
12891329
description: LoadBalancer Name.
12901330
type: string
1331+
nlbSpec:
1332+
description: The NLB Spec
1333+
properties:
1334+
backendSetDetails:
1335+
description: BackendSetDetails specifies the configuration
1336+
of a network load balancer backend set.
1337+
properties:
1338+
healthChecker:
1339+
description: If enabled existing connections will
1340+
be forwarded to an alternative healthy backend as
1341+
soon as current backend becomes unhealthy.
1342+
properties:
1343+
urlPath:
1344+
description: 'The path against which to run the
1345+
health check. Example: `/healthcheck` Default
1346+
value is `/healthz`'
1347+
type: string
1348+
type: object
1349+
isFailOpen:
1350+
description: If enabled, the network load balancer
1351+
will continue to distribute traffic in the configured
1352+
distribution in the event all backends are unhealthy.
1353+
The value is false by default.
1354+
type: boolean
1355+
isInstantFailoverEnabled:
1356+
description: If enabled existing connections will
1357+
be forwarded to an alternative healthy backend as
1358+
soon as current backend becomes unhealthy.
1359+
type: boolean
1360+
isPreserveSource:
1361+
description: If this parameter is enabled, then the
1362+
network load balancer preserves the source IP of
1363+
the packet when it is forwarded to backends. Backends
1364+
see the original source IP. If the isPreserveSourceDestination
1365+
parameter is enabled for the network load balancer
1366+
resource, then this parameter cannot be disabled.
1367+
The value is false by default.
1368+
type: boolean
1369+
type: object
1370+
type: object
12911371
type: object
12921372
skipNetworkManagement:
12931373
description: SkipNetworkManagement defines if the networking spec(VCN

‎config/crd/bases/infrastructure.cluster.x-k8s.io_ociclustertemplates.yaml

+88
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,50 @@ spec:
129129
name:
130130
description: LoadBalancer Name.
131131
type: string
132+
nlbSpec:
133+
description: The NLB Spec
134+
properties:
135+
backendSetDetails:
136+
description: BackendSetDetails specifies the configuration
137+
of a network load balancer backend set.
138+
properties:
139+
healthChecker:
140+
description: If enabled existing connections
141+
will be forwarded to an alternative healthy
142+
backend as soon as current backend becomes
143+
unhealthy.
144+
properties:
145+
urlPath:
146+
description: 'The path against which to
147+
run the health check. Example: `/healthcheck`
148+
Default value is `/healthz`'
149+
type: string
150+
type: object
151+
isFailOpen:
152+
description: If enabled, the network load
153+
balancer will continue to distribute traffic
154+
in the configured distribution in the event
155+
all backends are unhealthy. The value is
156+
false by default.
157+
type: boolean
158+
isInstantFailoverEnabled:
159+
description: If enabled existing connections
160+
will be forwarded to an alternative healthy
161+
backend as soon as current backend becomes
162+
unhealthy.
163+
type: boolean
164+
isPreserveSource:
165+
description: If this parameter is enabled,
166+
then the network load balancer preserves
167+
the source IP of the packet when it is forwarded
168+
to backends. Backends see the original source
169+
IP. If the isPreserveSourceDestination parameter
170+
is enabled for the network load balancer
171+
resource, then this parameter cannot be
172+
disabled. The value is false by default.
173+
type: boolean
174+
type: object
175+
type: object
132176
type: object
133177
skipNetworkManagement:
134178
description: SkipNetworkManagement defines if the networking
@@ -1347,6 +1391,50 @@ spec:
13471391
name:
13481392
description: LoadBalancer Name.
13491393
type: string
1394+
nlbSpec:
1395+
description: The NLB Spec
1396+
properties:
1397+
backendSetDetails:
1398+
description: BackendSetDetails specifies the configuration
1399+
of a network load balancer backend set.
1400+
properties:
1401+
healthChecker:
1402+
description: If enabled existing connections
1403+
will be forwarded to an alternative healthy
1404+
backend as soon as current backend becomes
1405+
unhealthy.
1406+
properties:
1407+
urlPath:
1408+
description: 'The path against which to
1409+
run the health check. Example: `/healthcheck`
1410+
Default value is `/healthz`'
1411+
type: string
1412+
type: object
1413+
isFailOpen:
1414+
description: If enabled, the network load
1415+
balancer will continue to distribute traffic
1416+
in the configured distribution in the event
1417+
all backends are unhealthy. The value is
1418+
false by default.
1419+
type: boolean
1420+
isInstantFailoverEnabled:
1421+
description: If enabled existing connections
1422+
will be forwarded to an alternative healthy
1423+
backend as soon as current backend becomes
1424+
unhealthy.
1425+
type: boolean
1426+
isPreserveSource:
1427+
description: If this parameter is enabled,
1428+
then the network load balancer preserves
1429+
the source IP of the packet when it is forwarded
1430+
to backends. Backends see the original source
1431+
IP. If the isPreserveSourceDestination parameter
1432+
is enabled for the network load balancer
1433+
resource, then this parameter cannot be
1434+
disabled. The value is false by default.
1435+
type: boolean
1436+
type: object
1437+
type: object
13501438
type: object
13511439
skipNetworkManagement:
13521440
description: SkipNetworkManagement defines if the networking

‎config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclusters.yaml

+80
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,46 @@ spec:
120120
name:
121121
description: LoadBalancer Name.
122122
type: string
123+
nlbSpec:
124+
description: The NLB Spec
125+
properties:
126+
backendSetDetails:
127+
description: BackendSetDetails specifies the configuration
128+
of a network load balancer backend set.
129+
properties:
130+
healthChecker:
131+
description: If enabled existing connections will
132+
be forwarded to an alternative healthy backend as
133+
soon as current backend becomes unhealthy.
134+
properties:
135+
urlPath:
136+
description: 'The path against which to run the
137+
health check. Example: `/healthcheck` Default
138+
value is `/healthz`'
139+
type: string
140+
type: object
141+
isFailOpen:
142+
description: If enabled, the network load balancer
143+
will continue to distribute traffic in the configured
144+
distribution in the event all backends are unhealthy.
145+
The value is false by default.
146+
type: boolean
147+
isInstantFailoverEnabled:
148+
description: If enabled existing connections will
149+
be forwarded to an alternative healthy backend as
150+
soon as current backend becomes unhealthy.
151+
type: boolean
152+
isPreserveSource:
153+
description: If this parameter is enabled, then the
154+
network load balancer preserves the source IP of
155+
the packet when it is forwarded to backends. Backends
156+
see the original source IP. If the isPreserveSourceDestination
157+
parameter is enabled for the network load balancer
158+
resource, then this parameter cannot be disabled.
159+
The value is false by default.
160+
type: boolean
161+
type: object
162+
type: object
123163
type: object
124164
skipNetworkManagement:
125165
description: SkipNetworkManagement defines if the networking spec(VCN
@@ -1294,6 +1334,46 @@ spec:
12941334
name:
12951335
description: LoadBalancer Name.
12961336
type: string
1337+
nlbSpec:
1338+
description: The NLB Spec
1339+
properties:
1340+
backendSetDetails:
1341+
description: BackendSetDetails specifies the configuration
1342+
of a network load balancer backend set.
1343+
properties:
1344+
healthChecker:
1345+
description: If enabled existing connections will
1346+
be forwarded to an alternative healthy backend as
1347+
soon as current backend becomes unhealthy.
1348+
properties:
1349+
urlPath:
1350+
description: 'The path against which to run the
1351+
health check. Example: `/healthcheck` Default
1352+
value is `/healthz`'
1353+
type: string
1354+
type: object
1355+
isFailOpen:
1356+
description: If enabled, the network load balancer
1357+
will continue to distribute traffic in the configured
1358+
distribution in the event all backends are unhealthy.
1359+
The value is false by default.
1360+
type: boolean
1361+
isInstantFailoverEnabled:
1362+
description: If enabled existing connections will
1363+
be forwarded to an alternative healthy backend as
1364+
soon as current backend becomes unhealthy.
1365+
type: boolean
1366+
isPreserveSource:
1367+
description: If this parameter is enabled, then the
1368+
network load balancer preserves the source IP of
1369+
the packet when it is forwarded to backends. Backends
1370+
see the original source IP. If the isPreserveSourceDestination
1371+
parameter is enabled for the network load balancer
1372+
resource, then this parameter cannot be disabled.
1373+
The value is false by default.
1374+
type: boolean
1375+
type: object
1376+
type: object
12971377
type: object
12981378
skipNetworkManagement:
12991379
description: SkipNetworkManagement defines if the networking spec(VCN

‎config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclustertemplates.yaml

+88
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,50 @@ spec:
134134
name:
135135
description: LoadBalancer Name.
136136
type: string
137+
nlbSpec:
138+
description: The NLB Spec
139+
properties:
140+
backendSetDetails:
141+
description: BackendSetDetails specifies the configuration
142+
of a network load balancer backend set.
143+
properties:
144+
healthChecker:
145+
description: If enabled existing connections
146+
will be forwarded to an alternative healthy
147+
backend as soon as current backend becomes
148+
unhealthy.
149+
properties:
150+
urlPath:
151+
description: 'The path against which to
152+
run the health check. Example: `/healthcheck`
153+
Default value is `/healthz`'
154+
type: string
155+
type: object
156+
isFailOpen:
157+
description: If enabled, the network load
158+
balancer will continue to distribute traffic
159+
in the configured distribution in the event
160+
all backends are unhealthy. The value is
161+
false by default.
162+
type: boolean
163+
isInstantFailoverEnabled:
164+
description: If enabled existing connections
165+
will be forwarded to an alternative healthy
166+
backend as soon as current backend becomes
167+
unhealthy.
168+
type: boolean
169+
isPreserveSource:
170+
description: If this parameter is enabled,
171+
then the network load balancer preserves
172+
the source IP of the packet when it is forwarded
173+
to backends. Backends see the original source
174+
IP. If the isPreserveSourceDestination parameter
175+
is enabled for the network load balancer
176+
resource, then this parameter cannot be
177+
disabled. The value is false by default.
178+
type: boolean
179+
type: object
180+
type: object
137181
type: object
138182
skipNetworkManagement:
139183
description: SkipNetworkManagement defines if the networking
@@ -1357,6 +1401,50 @@ spec:
13571401
name:
13581402
description: LoadBalancer Name.
13591403
type: string
1404+
nlbSpec:
1405+
description: The NLB Spec
1406+
properties:
1407+
backendSetDetails:
1408+
description: BackendSetDetails specifies the configuration
1409+
of a network load balancer backend set.
1410+
properties:
1411+
healthChecker:
1412+
description: If enabled existing connections
1413+
will be forwarded to an alternative healthy
1414+
backend as soon as current backend becomes
1415+
unhealthy.
1416+
properties:
1417+
urlPath:
1418+
description: 'The path against which to
1419+
run the health check. Example: `/healthcheck`
1420+
Default value is `/healthz`'
1421+
type: string
1422+
type: object
1423+
isFailOpen:
1424+
description: If enabled, the network load
1425+
balancer will continue to distribute traffic
1426+
in the configured distribution in the event
1427+
all backends are unhealthy. The value is
1428+
false by default.
1429+
type: boolean
1430+
isInstantFailoverEnabled:
1431+
description: If enabled existing connections
1432+
will be forwarded to an alternative healthy
1433+
backend as soon as current backend becomes
1434+
unhealthy.
1435+
type: boolean
1436+
isPreserveSource:
1437+
description: If this parameter is enabled,
1438+
then the network load balancer preserves
1439+
the source IP of the packet when it is forwarded
1440+
to backends. Backends see the original source
1441+
IP. If the isPreserveSourceDestination parameter
1442+
is enabled for the network load balancer
1443+
resource, then this parameter cannot be
1444+
disabled. The value is false by default.
1445+
type: boolean
1446+
type: object
1447+
type: object
13601448
type: object
13611449
skipNetworkManagement:
13621450
description: SkipNetworkManagement defines if the networking

‎config/crd/kustomization.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# It should be run by config/default
44
# Labels to add to all resources and selectors.
55
commonLabels:
6-
cluster.x-k8s.io/v1beta1: v1beta1
6+
cluster.x-k8s.io/v1beta1: v1beta1_v1beta2
77

88
resources:
99
- bases/infrastructure.cluster.x-k8s.io_ociclusters.yaml

‎go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/google/gofuzz v1.2.0
1111
github.com/onsi/ginkgo/v2 v2.17.1
1212
github.com/onsi/gomega v1.32.0
13-
github.com/oracle/oci-go-sdk/v65 v65.69.1
13+
github.com/oracle/oci-go-sdk/v65 v65.70.0
1414
github.com/pkg/errors v0.9.1
1515
github.com/prometheus/client_golang v1.18.0
1616
github.com/spf13/pflag v1.0.5

‎go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
199199
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
200200
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
201201
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
202-
github.com/oracle/oci-go-sdk/v65 v65.69.1 h1:X3vNSw9tXOxML96L3wBxrK7cwESgP/H1IgR8rTH5Ab4=
203-
github.com/oracle/oci-go-sdk/v65 v65.69.1/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
202+
github.com/oracle/oci-go-sdk/v65 v65.70.0 h1:gLa0IX/SidTm60VbHabnImrW3hyymmNLQJy6gZGrgDA=
203+
github.com/oracle/oci-go-sdk/v65 v65.70.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
204204
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
205205
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
206206
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=

‎metadata.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,7 @@ releaseSeries:
4949
contract: v1beta1
5050
- major: 0
5151
minor: 15
52+
contract: v1beta1
53+
- major: 0
54+
minor: 16
5255
contract: v1beta1

0 commit comments

Comments
 (0)
Please sign in to comment.