func GetPodReadyCondition(status PodStatus) *PodCondition {
	for i, c := range status.Conditions {
		if c.Type == PodReady {
			return &status.Conditions[i]
		}
	}
	return nil
}
Extracts the pod ready condition from the given status and returns that.
Returns nil if the condition is not present.
package api
import (
	"k8s.io/kubernetes/pkg/api/resource"
)
func (self ResourceName) String() string {
	return string(self)
}
func (self *ResourceList) Cpu() *resource.Quantity {
	if val, ok := (*self)[ResourceCPU]; ok {
		return &val
	}
	return &resource.Quantity{Format: resource.DecimalSI}
}
func (self *ResourceList) Memory() *resource.Quantity {
	if val, ok := (*self)[ResourceMemory]; ok {
		return &val
	}
	return &resource.Quantity{Format: resource.BinarySI}
}
func (self *ResourceList) Pods() *resource.Quantity {
	if val, ok := (*self)[ResourcePods]; ok {
		return &val
	}
	return &resource.Quantity{}
}
func GetContainerStatus(statuses []ContainerStatus, name string) (ContainerStatus, bool) {
	for i := range statuses {
		if statuses[i].Name == name {
			return statuses[i], true
		}
	}
	return ContainerStatus{}, false
}
func GetExistingContainerStatus(statuses []ContainerStatus, name string) ContainerStatus {
	for i := range statuses {
		if statuses[i].Name == name {
			return statuses[i]
		}
	}
	return ContainerStatus{}
}
func IsPodReady(pod *Pod) bool {
	return IsPodReadyConditionTrue(pod.Status)
}
func IsPodReadyConditionTrue(status PodStatus) bool {
	condition := GetPodReadyCondition(status)
	return condition != nil && condition.Status == ConditionTrue
}