We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9ced09 commit af9059fCopy full SHA for af9059f
pkg/lib/k8s/pod.go
@@ -172,9 +172,7 @@ func GetPodStatus(pod *kcore.Pod) PodStatus {
172
numFailed := 0
173
numKilled := 0
174
for _, containerStatus := range pod.Status.ContainerStatuses {
175
- if containerStatus.State.Waiting != nil {
176
- numWaiting++
177
- } else if containerStatus.State.Running != nil {
+ if containerStatus.State.Running != nil {
178
if containerStatus.Ready {
179
numRunning++
180
} else {
@@ -199,7 +197,8 @@ func GetPodStatus(pod *kcore.Pod) PodStatus {
199
197
numFailed++
200
198
}
201
202
- return PodStatusUnknown
+ // either containerStatus.State.Waiting != nil or all containerStatus.States are nil (which implies waiting)
+ numWaiting++
203
204
205
if numKilled > 0 {
0 commit comments