mirror of https://github.com/kubernetes/kops.git
Move DNS topology setup earlier in cluster creation
This is needed because setting the bastion public name field depends on the DNS topology. We were incorrectly setting bastion.publicName for dns=none clusters because the dns=none field wasn't yet set on the cluster.
This commit is contained in:
parent
446f3acaf1
commit
ac13fa610c
|
@ -1267,6 +1267,12 @@ func setupTopology(opt *NewClusterOptions, cluster *api.Cluster, allZones sets.S
|
|||
}
|
||||
|
||||
cluster.Spec.Networking.Topology = &api.TopologySpec{}
|
||||
|
||||
err := setupDNSTopology(opt, cluster)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch opt.Topology {
|
||||
case api.TopologyPublic:
|
||||
|
||||
|
@ -1405,10 +1411,6 @@ func setupTopology(opt *NewClusterOptions, cluster *api.Cluster, allZones sets.S
|
|||
}
|
||||
}
|
||||
|
||||
err := setupDNSTopology(opt, cluster)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return bastions, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue