Documentation ¶
Index ¶
- Constants
- func GenerateContainersReadyCondition(spec *v1.PodSpec, containerStatuses []v1.ContainerStatus, podPhase v1.PodPhase) v1.PodCondition
- func GeneratePodInitializedCondition(spec *v1.PodSpec, containerStatuses []v1.ContainerStatus, podPhase v1.PodPhase) v1.PodCondition
- func GeneratePodReadyCondition(spec *v1.PodSpec, conditions []v1.PodCondition, ...) v1.PodCondition
- func GetContainerStatus(statuses []v1.ContainerStatus, name string) (v1.ContainerStatus, bool)
- func GetPodConditionFromList(conditions []v1.PodCondition, conditionType v1.PodConditionType) (int, *v1.PodCondition)
Constants ¶
const ( // UnknownContainerStatuses says that all container statuses are unknown. UnknownContainerStatuses = "UnknownContainerStatuses" // PodCompleted says that all related containers have succeeded. PodCompleted = "PodCompleted" // ContainersNotReady says that one or more containers are not ready. ContainersNotReady = "ContainersNotReady" // ContainersNotInitialized says that one or more init containers have not succeeded. ContainersNotInitialized = "ContainersNotInitialized" // ReadinessGatesNotReady says that one or more pod readiness gates are not ready. ReadinessGatesNotReady = "ReadinessGatesNotReady" )
Variables ¶
This section is empty.
Functions ¶
func GenerateContainersReadyCondition ¶
func GenerateContainersReadyCondition(spec *v1.PodSpec, containerStatuses []v1.ContainerStatus, podPhase v1.PodPhase) v1.PodCondition
GenerateContainersReadyCondition returns the status of "ContainersReady" condition. The status of "ContainersReady" condition is true when all containers are ready.
func GeneratePodInitializedCondition ¶
func GeneratePodInitializedCondition(spec *v1.PodSpec, containerStatuses []v1.ContainerStatus, podPhase v1.PodPhase) v1.PodCondition
GeneratePodInitializedCondition returns initialized condition if all init containers in a pod are ready, else it returns an uninitialized condition.
func GeneratePodReadyCondition ¶
func GeneratePodReadyCondition(spec *v1.PodSpec, conditions []v1.PodCondition, containerStatuses []v1.ContainerStatus, podPhase v1.PodPhase) v1.PodCondition
GeneratePodReadyCondition returns "Ready" condition of a pod. The status of "Ready" condition is "True", if all containers in a pod are ready AND all matching conditions specified in the ReadinessGates have status equal to "True".
func GetContainerStatus ¶
func GetContainerStatus(statuses []v1.ContainerStatus, name string) (v1.ContainerStatus, bool)
GetContainerStatus extracts the status of container "name" from "statuses". It also returns if "name" exists.
func GetPodConditionFromList ¶
func GetPodConditionFromList(conditions []v1.PodCondition, conditionType v1.PodConditionType) (int, *v1.PodCondition)
GetPodConditionFromList extracts the provided condition from the given list of condition and returns the index of the condition and the condition. Returns -1 and nil if the condition is not present.
Types ¶
This section is empty.