Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
vie-serendipity committed Jul 27, 2023
1 parent cde995b commit 426dd79
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/e2e/cmd/init/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,20 +284,20 @@ func (c *ClusterConverter) deployYurtManager() error {
}

if podList.Items[0].Status.Phase == corev1.PodRunning {
if podList.Items[0].Status.ContainerStatuses[0].Ready == false {
klog.Info("yurt manager's container is not ready")
return false, nil
}
for i := range podList.Items[0].Status.Conditions {
if podList.Items[0].Status.Conditions[i].Type == corev1.PodReady &&
podList.Items[0].Status.Conditions[i].Status == corev1.ConditionTrue {
klog.Info("yurt manager's container and pod are both ready")
return true, nil
podList.Items[0].Status.Conditions[i].Status != corev1.ConditionTrue {
klog.Infof("pod(%s/%s): %#v", podList.Items[0].Namespace, podList.Items[0].Name, podList.Items[0])
return false, nil
}
if podList.Items[0].Status.Conditions[i].Type == corev1.ContainersReady &&
podList.Items[0].Status.Conditions[i].Status != corev1.ConditionTrue {
klog.Info("yurt manager's container is not ready")
return false, nil
}
}
}
klog.Infof("pod(%s/%s): %#v", podList.Items[0].Namespace, podList.Items[0].Name, podList.Items[0])
return false, nil
return true, nil
})
}

Expand Down

0 comments on commit 426dd79

Please sign in to comment.