File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ func (b *APILoadBalancerBuilder) createInternalLB(c *fi.CloudupModelBuilderConte
146146 c .AddTask (hc )
147147 var igms []* gcetasks.InstanceGroupManager
148148 for _ , ig := range b .InstanceGroups {
149- if ig .Spec . Role != kops . InstanceGroupRoleControlPlane {
149+ if ! ig .HasAPIServer () {
150150 continue
151151 }
152152 if len (ig .Spec .Zones ) > 1 {
Original file line number Diff line number Diff line change @@ -214,6 +214,10 @@ func (b *AutoscalingGroupModelBuilder) buildInstanceTemplate(c *fi.CloudupModelB
214214 t .Tags = append (t .Tags , b .GCETagForRole (kops .InstanceGroupRoleControlPlane ))
215215 t .Tags = append (t .Tags , b .GCETagForRole ("master" ))
216216
217+ case kops .InstanceGroupRoleAPIServer :
218+ t .Scopes = append (t .Scopes , "https://www.googleapis.com/auth/ndev.clouddns.readwrite" )
219+ t .Tags = append (t .Tags , b .GCETagForRole (kops .InstanceGroupRoleControlPlane ))
220+
217221 case kops .InstanceGroupRoleNode :
218222 t .Tags = append (t .Tags , b .GCETagForRole (kops .InstanceGroupRoleNode ))
219223
@@ -349,8 +353,8 @@ func (b *AutoscalingGroupModelBuilder) Build(c *fi.CloudupModelBuilderContext) e
349353 ListManagedInstancesResults : "PAGINATED" ,
350354 }
351355
352- // Attach masters to load balancer if we're using one
353- if ig .Spec . Role == kops . InstanceGroupRoleControlPlane {
356+ // Attach API server instances to load balancer if we're using one
357+ if ig .HasAPIServer () {
354358 if b .UseLoadBalancerForAPI () {
355359 lbSpec := b .Cluster .Spec .API .LoadBalancer
356360 if lbSpec != nil {
You can’t perform that action at this time.
0 commit comments