mirror of https://github.com/kubernetes/kops.git
Merge pull request #8002 from srikiz/DO-7956-FixEtcdNameLogic
[Issue-7956] - [Digital Ocean] Minor fix to have proper indexing for digital ocean regions
This commit is contained in:
commit
e11f394f05
|
|
@ -726,8 +726,14 @@ func RunCreateCluster(f *util.Factory, out io.Writer, c *CreateClusterOptions) e
|
|||
for i := 0; i < int(masterCount); i++ {
|
||||
zone := masterZones[i%len(masterZones)]
|
||||
name := zone
|
||||
if int(masterCount) > len(masterZones) {
|
||||
name += "-" + strconv.Itoa(1+(i/len(masterZones)))
|
||||
if api.CloudProviderID(cluster.Spec.CloudProvider) == api.CloudProviderDO {
|
||||
if int(masterCount) >= len(masterZones) {
|
||||
name += "-" + strconv.Itoa(1+(i/len(masterZones)))
|
||||
}
|
||||
} else {
|
||||
if int(masterCount) > len(masterZones) {
|
||||
name += "-" + strconv.Itoa(1+(i/len(masterZones)))
|
||||
}
|
||||
}
|
||||
|
||||
g := &api.InstanceGroup{}
|
||||
|
|
|
|||
Loading…
Reference in New Issue