Skip to content

Commit

Permalink
fix: sort node role (#2124)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Jan 13, 2025
1 parent d14eaac commit 73c1875
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/handler/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"runtime"
"sort"
"strings"

"github.com/goodrain/rainbond/api/model"
Expand Down Expand Up @@ -264,8 +265,8 @@ func (n *nodesHandle) HandleNodeInfo(node v1.Node) (nodeinfo model.NodeInfo, err
}
roles = append(roles, role)
}
continue
}
sort.Strings(roles)
logrus.Infof("show node role %v", roles)
// req resource from Prometheus
var query string
Expand Down

0 comments on commit 73c1875

Please sign in to comment.