mirror of
https://github.com/zalando-incubator/kube-metrics-adapter.git
synced 2024-12-22 19:16:06 +00:00
Added conditions[i].Status == corev1.ConditionTrue check
Signed-off-by: Anatolii Dutchak <adutchak-x@tunein.com>
This commit is contained in:
parent
5aa2272e37
commit
721c6553d8
@ -180,7 +180,7 @@ func GetPodReadyAge(pod corev1.Pod) (bool, time.Duration) {
|
||||
return false, podReadyAge
|
||||
}
|
||||
for i := range conditions {
|
||||
if conditions[i].Type == corev1.PodReady {
|
||||
if conditions[i].Type == corev1.PodReady && conditions[i].Status == corev1.ConditionTrue {
|
||||
podReadyAge = time.Since(conditions[i].LastTransitionTime.Time)
|
||||
return true, podReadyAge
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user