Skip to content

Commit

Permalink
GCE - Set Bastion InstanceGroup zone
Browse files Browse the repository at this point in the history
GCE uses Spec.Zones rather than Spec.Subnets because subnets are regional rather than zonal.
This sets the Zones field for bastion IGs in GCE, avoiding an index out of range panic during cluster creation.
  • Loading branch information
rifelpet committed Aug 27, 2020
1 parent e5e8908 commit 8bf1dfd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions upup/pkg/fi/cloudup/new_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,9 @@ func setupTopology(opt *NewClusterOptions, cluster *api.Cluster, allZones sets.S
BastionPublicName: "bastion." + cluster.Name,
}
}
if api.CloudProviderID(cluster.Spec.CloudProvider) == api.CloudProviderGCE {
bastionGroup.Spec.Zones = allZones.List()
}
}

default:
Expand Down

0 comments on commit 8bf1dfd

Please sign in to comment.