Skip to content

Commit 546736a

Browse files
authored
Merge pull request #948 from cheney-lin/fix/get_headroom
fix(sysadvisor): pending Pods is considered as Active
2 parents 004dd4a + 6c02939 commit 546736a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/util/native/pods.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func PodIsReady(pod *v1.Pod) bool {
171171

172172
// PodIsActive returns whether the pod is not terminated.
173173
func PodIsActive(pod *v1.Pod) bool {
174-
return !PodIsTerminated(pod)
174+
return !PodIsTerminated(pod) && !PodIsPending(pod)
175175
}
176176

177177
// PodIsPending returns whether the pod is pending.

0 commit comments

Comments
 (0)