[REV] optimize node status

This commit is contained in:
bay1ts 2017-12-07 20:01:09 +08:00
parent fc69a1ac30
commit 7c65aa13d8

View File

@ -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{}