mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Merge pull request #1777 from dchen1107/status
After all containers in a pod started, If any one container is still run...
This commit is contained in:
commit
c135f8a83e
@ -311,7 +311,7 @@ func getPodStatus(pod *api.Pod, minions client.MinionInterface) (api.PodStatus,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch {
|
switch {
|
||||||
case running > 0 && stopped == 0 && unknown == 0:
|
case running > 0 && unknown == 0:
|
||||||
return api.PodRunning, nil
|
return api.PodRunning, nil
|
||||||
case running == 0 && stopped > 0 && unknown == 0:
|
case running == 0 && stopped > 0 && unknown == 0:
|
||||||
return api.PodTerminated, nil
|
return api.PodTerminated, nil
|
||||||
|
@ -496,7 +496,7 @@ func TestMakePodStatus(t *testing.T) {
|
|||||||
Host: "machine",
|
Host: "machine",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
api.PodWaiting,
|
api.PodRunning,
|
||||||
"mixed state #1",
|
"mixed state #1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user