forked from toolshed/abra
fix: manage multiple version showing edge cases
This commit is contained in:
@ -299,8 +299,8 @@ func GetAppStatuses(appFiles AppFiles) (map[string]map[string]string, error) {
|
||||
|
||||
for range servers {
|
||||
status := <-ch
|
||||
result := make(map[string]string)
|
||||
for _, service := range status.Services {
|
||||
result := make(map[string]string)
|
||||
name := service.Spec.Labels[convert.LabelNamespace]
|
||||
|
||||
if _, ok := statuses[name]; !ok {
|
||||
@ -310,6 +310,11 @@ func GetAppStatuses(appFiles AppFiles) (map[string]map[string]string, error) {
|
||||
labelKey := fmt.Sprintf("coop-cloud.%s.version", name)
|
||||
if version, ok := service.Spec.Labels[labelKey]; ok {
|
||||
result["version"] = version
|
||||
} else {
|
||||
//FIXME: we only need to check containers with the version label not
|
||||
// every single container and then skip when we see no label perf gains
|
||||
// to be had here
|
||||
continue
|
||||
}
|
||||
|
||||
statuses[name] = result
|
||||
|
Reference in New Issue
Block a user