Setting PodReadyCondition.LastTransitionTime

This commit is contained in:
nikhiljindal
2015-09-29 13:04:08 -07:00
parent ae81f0b55f
commit b99d225d19
5 changed files with 155 additions and 69 deletions

View File

@@ -80,9 +80,9 @@ func IsPodReadyConditionTrue(status PodStatus) bool {
// Extracts the pod ready condition from the given status and returns that.
// Returns nil if the condition is not present.
func GetPodReadyCondition(status PodStatus) *PodCondition {
for _, c := range status.Conditions {
for i, c := range status.Conditions {
if c.Type == PodReady {
return &c
return &status.Conditions[i]
}
}
return nil