Skip to content

Commit c6ee791

Browse files
committed
Add support for creating an internal load balancer using the predefined IP from the control plane endpoint
1 parent 71f39ce commit c6ee791

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cloud/services/compute/loadbalancers/reconcile.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,9 @@ func (s *Service) createOrGetInternalAddress(ctx context.Context, lbname string)
525525
log.Error(err, "Error getting subnet for Internal Load Balancer")
526526
return nil, err
527527
}
528+
if s.scope.ControlPlaneEndpoint().Host != "" {
529+
addrSpec.Address = s.scope.ControlPlaneEndpoint().Host
530+
}
528531
addrSpec.Subnetwork = subnet.SelfLink
529532
addrSpec.Purpose = "GCE_ENDPOINT"
530533
log.V(2).Info("Looking for internal address", "name", addrSpec.Name)

0 commit comments

Comments
 (0)