Skip to content

Commit

Permalink
Merge pull request #9167 from srikiz/automated-cherry-pick-of-#8002-u…
Browse files Browse the repository at this point in the history
…pstream-release-1.17

Automated cherry pick of #8002: Minor fix to have proper indexing for digital ocean
  • Loading branch information
k8s-ci-robot committed May 23, 2020
2 parents 1c9ca79 + 245c902 commit 37571af
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/kops/create_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down

0 comments on commit 37571af

Please sign in to comment.