Sort database by name.

This commit is contained in:
Oleksii Kliukin 2017-12-22 15:48:13 +01:00
parent 6102b0368c
commit 5c8bd04169
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package controller
import (
"fmt"
"sort"
"sync/atomic"
"github.com/Sirupsen/logrus"
@ -46,6 +47,7 @@ func (c *Controller) ClusterDatabasesMap() map[string][]string {
for database := range spec.Spec.Databases {
m[cluster.Name] = append(m[cluster.Name], database)
}
sort.Strings(m[cluster.Name])
} else {
c.logger.Warningf("could not get the list of databases for cluster %q: %v", cluster.Name, err)
}