Skip to content

Commit

Permalink
feat: 优化k8s获取podList信息 #229
Browse files Browse the repository at this point in the history
  • Loading branch information
flyy1012 committed May 24, 2024
1 parent c7fd4c6 commit ce0ea54
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -538,12 +538,9 @@ func (o *operator) getPods(clusterID, namespace, name string, info *op.ServiceIn
Ports: ports,
})
}
if len(podList.Items) == 0 && info.Status != op.ServiceStatusStaging {
blog.Warnf("k8s-operator: found pods of %s num(%d) in status %s", name, len(podList.Items), info.Status)
}
// if taskgroup are not all built, just means that the application is staging yet.
if (info.RequestInstances > len(podList.Items)) && info.Status != op.ServiceStatusStaging {
blog.Warnf("k8s-operator: found RequestInstances(%d) less than pods num(%d) of %s in status %s", info.RequestInstances, len(podList.Items), name, info.Status)
blog.Warnf("k8s-operator: found RequestInstances(%d) greater than pods num(%d) of %s in status %s", info.RequestInstances, len(podList.Items), name, info.Status)
info.Status = op.ServiceStatusStaging
}

Expand Down

0 comments on commit ce0ea54

Please sign in to comment.