Sort database by name.
This commit is contained in:
		
							parent
							
								
									6102b0368c
								
							
						
					
					
						commit
						5c8bd04169
					
				|  | @ -2,6 +2,7 @@ package controller | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
|  | 	"sort" | ||||||
| 	"sync/atomic" | 	"sync/atomic" | ||||||
| 
 | 
 | ||||||
| 	"github.com/Sirupsen/logrus" | 	"github.com/Sirupsen/logrus" | ||||||
|  | @ -46,6 +47,7 @@ func (c *Controller) ClusterDatabasesMap() map[string][]string { | ||||||
| 			for database := range spec.Spec.Databases { | 			for database := range spec.Spec.Databases { | ||||||
| 				m[cluster.Name] = append(m[cluster.Name], database) | 				m[cluster.Name] = append(m[cluster.Name], database) | ||||||
| 			} | 			} | ||||||
|  | 			sort.Strings(m[cluster.Name]) | ||||||
| 		} else { | 		} else { | ||||||
| 			c.logger.Warningf("could not get the list of databases for cluster %q: %v", cluster.Name, err) | 			c.logger.Warningf("could not get the list of databases for cluster %q: %v", cluster.Name, err) | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue