Default to bastion-$clustername for new bastion clusters

This commit is contained in:
Kris Childress 2016-12-25 19:29:39 -07:00
parent 789bfcf07b
commit 898f7e33d8
1 changed files with 6 additions and 0 deletions

View File

@ -473,6 +473,12 @@ func RunCreateCluster(f *util.Factory, out io.Writer, c *CreateClusterOptions) e
}
cluster.Spec.Subnets = append(cluster.Spec.Subnets, utilitySubnets...)
// Default to a DNS name for the bastion
cluster.Spec.Topology.Bastion = &api.BastionSpec{
BastionPublicName: "bastion-" + clusterName,
}
if c.Bastion {
bastionGroup := &api.InstanceGroup{}
bastionGroup.Spec.Role = api.InstanceGroupRoleBastion