mirror of
https://github.com/zalando-incubator/kube-metrics-adapter.git
synced 2025-07-05 19:47:24 +00:00
Added conditions[i].Status == corev1.ConditionTrue check
Signed-off-by: Anatolii Dutchak <adutchak-x@tunein.com>
This commit is contained in:
@ -180,7 +180,7 @@ func GetPodReadyAge(pod corev1.Pod) (bool, time.Duration) {
|
|||||||
return false, podReadyAge
|
return false, podReadyAge
|
||||||
}
|
}
|
||||||
for i := range conditions {
|
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)
|
podReadyAge = time.Since(conditions[i].LastTransitionTime.Time)
|
||||||
return true, podReadyAge
|
return true, podReadyAge
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user