未验证 提交 ddd6e1aa 编写于 作者: H hongming

fix: Daemonset status search returns wrong result

Signed-off-by: Nhongming <talonwan@yunify.com>
上级 c870209e
......@@ -38,9 +38,9 @@ func (c *daemonSetSearcher) Get(namespace, name string) (interface{}, error) {
}
func daemonSetStatus(item *v1.DaemonSet) string {
if item.Status.NumberAvailable == 0 {
if item.Status.DesiredNumberScheduled == 0 && item.Status.NumberReady == 0 {
return v1alpha2.StatusStopped
} else if item.Status.DesiredNumberScheduled == item.Status.NumberAvailable {
} else if item.Status.DesiredNumberScheduled == item.Status.NumberReady {
return v1alpha2.StatusRunning
} else {
return v1alpha2.StatusUpdating
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册