Skip to content

Commit 1cc2bc3

Browse files
authoredMar 12, 2024··
Configure private or public loadbalancer (#1656)
1 parent fca955e commit 1cc2bc3

7 files changed

+19
-15
lines changed
 

‎api/v1beta2/ibmpowervscluster_types.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,12 @@ type IBMPowerVSClusterSpec struct {
112112
TransitGateway *TransitGateway `json:"transitGateway,omitempty"`
113113

114114
// loadBalancers is optional configuration for configuring loadbalancers to control plane or data plane nodes.
115-
// when omitted system will create a public loadbalancer with name CLUSTER_NAME-loadbalancer.
115+
// when omitted system will create a default public loadbalancer with name CLUSTER_NAME-loadbalancer.
116116
// when specified a vpc loadbalancer will be created and controlPlaneEndpoint will be set with associated hostname of loadbalancer.
117117
// ControlPlaneEndpoint will be set with associated hostname of public loadbalancer.
118118
// when LoadBalancers[].ID is set, its expected that there exist a loadbalancer with ID or else system will give error.
119119
// when LoadBalancers[].Name is set, system will first check for loadbalancer with Name, if not exist system will create new loadbalancer.
120+
// For each loadbalancer a default backed pool and front listener will be configured with port 6443.
120121
// +optional
121122
LoadBalancers []VPCLoadBalancerSpec `json:"loadBalancers,omitempty"`
122123

‎api/v1beta2/ibmvpccluster_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ type VPCLoadBalancerSpec struct {
7272
// +optional
7373
Public bool `json:"public,omitempty"`
7474

75-
// AdditionalListeners sets the additional listeners for the control plane load balancer. .
75+
// AdditionalListeners sets the additional listeners for the control plane load balancer.
7676
// +listType=map
7777
// +listMapKey=port
7878
// +optional

‎cloud/scope/powervs_cluster.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ func (s *PowerVSClusterScope) createLoadBalancer(lb infrav1beta2.VPCLoadBalancer
12971297
}
12981298

12991299
options.SetName(lb.Name)
1300-
options.SetIsPublic(true)
1300+
options.SetIsPublic(lb.Public)
13011301
options.SetResourceGroup(&vpcv1.ResourceGroupIdentity{
13021302
ID: &resourceGroupID,
13031303
})
@@ -1361,7 +1361,7 @@ func (s *PowerVSClusterScope) createLoadBalancer(lb infrav1beta2.VPCLoadBalancer
13611361
ID: loadBalancer.ID,
13621362
State: lbState,
13631363
Hostname: loadBalancer.Hostname,
1364-
ControllerCreated: pointer.Bool(lb.Public),
1364+
ControllerCreated: pointer.Bool(true),
13651365
}, nil
13661366
}
13671367

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -247,21 +247,23 @@ spec:
247247
loadBalancers:
248248
description: loadBalancers is optional configuration for configuring
249249
loadbalancers to control plane or data plane nodes. when omitted
250-
system will create a public loadbalancer with name CLUSTER_NAME-loadbalancer.
250+
system will create a default public loadbalancer with name CLUSTER_NAME-loadbalancer.
251251
when specified a vpc loadbalancer will be created and controlPlaneEndpoint
252252
will be set with associated hostname of loadbalancer. ControlPlaneEndpoint
253253
will be set with associated hostname of public loadbalancer. when
254254
LoadBalancers[].ID is set, its expected that there exist a loadbalancer
255255
with ID or else system will give error. when LoadBalancers[].Name
256256
is set, system will first check for loadbalancer with Name, if not
257-
exist system will create new loadbalancer.
257+
exist system will create new loadbalancer. For each loadbalancer
258+
a default backed pool and front listener will be configured with
259+
port 6443.
258260
items:
259261
description: VPCLoadBalancerSpec defines the desired state of an
260262
VPC load balancer.
261263
properties:
262264
additionalListeners:
263265
description: AdditionalListeners sets the additional listeners
264-
for the control plane load balancer. .
266+
for the control plane load balancer.
265267
items:
266268
description: AdditionalListenerSpec defines the desired state
267269
of an additional listener on an VPC load balancer.

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

+7-6
Original file line numberDiff line numberDiff line change
@@ -274,23 +274,24 @@ spec:
274274
loadBalancers:
275275
description: loadBalancers is optional configuration for configuring
276276
loadbalancers to control plane or data plane nodes. when
277-
omitted system will create a public loadbalancer with name
278-
CLUSTER_NAME-loadbalancer. when specified a vpc loadbalancer
279-
will be created and controlPlaneEndpoint will be set with
280-
associated hostname of loadbalancer. ControlPlaneEndpoint
277+
omitted system will create a default public loadbalancer
278+
with name CLUSTER_NAME-loadbalancer. when specified a vpc
279+
loadbalancer will be created and controlPlaneEndpoint will
280+
be set with associated hostname of loadbalancer. ControlPlaneEndpoint
281281
will be set with associated hostname of public loadbalancer.
282282
when LoadBalancers[].ID is set, its expected that there
283283
exist a loadbalancer with ID or else system will give error.
284284
when LoadBalancers[].Name is set, system will first check
285285
for loadbalancer with Name, if not exist system will create
286-
new loadbalancer.
286+
new loadbalancer. For each loadbalancer a default backed
287+
pool and front listener will be configured with port 6443.
287288
items:
288289
description: VPCLoadBalancerSpec defines the desired state
289290
of an VPC load balancer.
290291
properties:
291292
additionalListeners:
292293
description: AdditionalListeners sets the additional
293-
listeners for the control plane load balancer. .
294+
listeners for the control plane load balancer.
294295
items:
295296
description: AdditionalListenerSpec defines the desired
296297
state of an additional listener on an VPC load balancer.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ spec:
243243
properties:
244244
additionalListeners:
245245
description: AdditionalListeners sets the additional listeners
246-
for the control plane load balancer. .
246+
for the control plane load balancer.
247247
items:
248248
description: AdditionalListenerSpec defines the desired state
249249
of an additional listener on an VPC load balancer.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ spec:
9393
properties:
9494
additionalListeners:
9595
description: AdditionalListeners sets the additional listeners
96-
for the control plane load balancer. .
96+
for the control plane load balancer.
9797
items:
9898
description: AdditionalListenerSpec defines the desired
9999
state of an additional listener on an VPC load balancer.

0 commit comments

Comments
 (0)
Please sign in to comment.