Skip to content

Commit

Permalink
Use a more generic check for etcd member prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciprian Hacman committed Jan 19, 2021
1 parent ad6ebf7 commit 4a22159
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions upup/pkg/fi/cloudup/new_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,9 @@ func trimCommonPrefix(names []string) []string {
}
}

for i := range names {
_, err := strconv.Atoi(names[i])
if err == nil {
names[i] = "etcd-" + names[i]
for i, name := range names {
if len(name) > 0 && name[0] >= '0' && name[0] <= '9' {
names[i] = "etcd-" + name
}
}

Expand Down

0 comments on commit 4a22159

Please sign in to comment.