@@ -14,6 +14,7 @@ import (
1414 "github.com/openshift/installer/pkg/asset"
1515 "github.com/openshift/installer/pkg/asset/installconfig"
1616 "github.com/openshift/installer/pkg/asset/manifests/capiutils"
17+ "github.com/openshift/installer/pkg/types"
1718)
1819
1920// GenerateClusterAssets generates the manifests for the cluster-api.
@@ -173,6 +174,24 @@ func GenerateClusterAssets(installConfig *installconfig.InstallConfig, clusterID
173174 },
174175 }
175176
177+ if installConfig .Config .Publish == types .ExternalPublishingStrategy {
178+ awsCluster .Spec .SecondaryControlPlaneLoadBalancer = & capa.AWSLoadBalancerSpec {
179+ Name : ptr .To (clusterID .InfraID + "-ext" ),
180+ LoadBalancerType : capa .LoadBalancerTypeNLB ,
181+ Scheme : & capa .ELBSchemeInternetFacing ,
182+ CrossZoneLoadBalancing : true ,
183+ IngressRules : []capa.IngressRule {
184+ {
185+ Description : "Kubernetes API Server traffic for public access" ,
186+ Protocol : capa .SecurityGroupProtocolTCP ,
187+ FromPort : 6443 ,
188+ ToPort : 6443 ,
189+ CidrBlocks : []string {"0.0.0.0/0" },
190+ },
191+ },
192+ }
193+ }
194+
176195 // If the install config has subnets, use them.
177196 if len (installConfig .AWS .Subnets ) > 0 {
178197 privateSubnets , err := installConfig .AWS .PrivateSubnets (context .TODO ())
0 commit comments