mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 03:37:46 +08:00
[REV] optimize node status
This commit is contained in:
parent
fc69a1ac30
commit
7c65aa13d8
@ -219,7 +219,6 @@ func Instances(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
logrus.Infof("get pods from node %s is %v",node.HostName,ps)
|
||||
pods := []*model.Pods{}
|
||||
var cpuR int64
|
||||
cpuRR := 0
|
||||
@ -230,7 +229,8 @@ func Instances(w http.ResponseWriter, r *http.Request) {
|
||||
var memL int64
|
||||
memLR := 0
|
||||
for _, v := range ps {
|
||||
if v.Spec.NodeName != node.HostName {
|
||||
logrus.Infof("pos 's node name is %s and node is %s",v.Spec.NodeName,node.HostName)
|
||||
if v.Spec.NodeName != node.InternalIP {
|
||||
continue
|
||||
}
|
||||
pod := &model.Pods{}
|
||||
|
Loading…
Reference in New Issue
Block a user