File tree Expand file tree Collapse file tree
tests/integration/update_cluster/minimal_gce_plb_apiserver Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -314,6 +314,14 @@ func (b *AutoscalingGroupModelBuilder) splitToZones(ig *kops.InstanceGroup) (map
314314}
315315
316316func (b * AutoscalingGroupModelBuilder ) Build (c * fi.CloudupModelBuilderContext ) error {
317+ clusterHasApiServerOnly := false
318+ for _ , ig := range b .InstanceGroups {
319+ if ig .IsAPIServerOnly () {
320+ clusterHasApiServerOnly = true
321+ break
322+ }
323+ }
324+
317325 for _ , ig := range b .InstanceGroups {
318326 subnets , err := b .GatherSubnets (ig )
319327 if err != nil {
@@ -354,7 +362,11 @@ func (b *AutoscalingGroupModelBuilder) Build(c *fi.CloudupModelBuilderContext) e
354362 }
355363
356364 // Attach API server instances to load balancer if we're using one
357- if ig .HasAPIServer () {
365+ // Do not attach API server instances from the control plane if we
366+ // have an APIServer only IG declared. We are assuming that APIServer
367+ // only IG is a front end and other APIServers are dedicated for
368+ // internal use
369+ if ig .IsAPIServerOnly () || (! clusterHasApiServerOnly && ig .IsControlPlane ()) {
358370 if b .UseLoadBalancerForAPI () {
359371 lbSpec := b .Cluster .Spec .API .LoadBalancer
360372 if lbSpec != nil {
Original file line number Diff line number Diff line change @@ -494,7 +494,6 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-minimal-gc
494494 }
495495 list_managed_instances_results = " PAGINATED"
496496 name = " a-master-us-test1-a-minimal-gce-plb-apiserver-example-com"
497- target_pools = [google_compute_target_pool . api-minimal-gce-plb-apiserver-example-com . self_link ]
498497 target_size = 1
499498 update_policy {
500499 minimal_action = " REPLACE"
You can’t perform that action at this time.
0 commit comments