Skip to content

Commit

Permalink
Merge pull request #231 from tbs60/dev_yanafu
Browse files Browse the repository at this point in the history
feat: 优化k8s获取podList信息
  • Loading branch information
tming authored May 24, 2024
2 parents 309349f + ce0ea54 commit de235c9
Showing 1 changed file with 2 additions and 5 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)
if (info.RequestInstances > len(podList.Items)) && info.Status != op.ServiceStatusStaging {
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 de235c9

Please sign in to comment.