kubernetes: k8s.io/kubernetes/pkg/kubelet/status Index | Files | Directories

package status

import "k8s.io/kubernetes/pkg/kubelet/status"


Package Files

generate.go status_manager.go


const (
    UnknownContainerStatuses = "UnknownContainerStatuses"
    PodCompleted             = "PodCompleted"
    ContainersNotReady       = "ContainersNotReady"
    ContainersNotInitialized = "ContainersNotInitialized"
    ReadinessGatesNotReady   = "ReadinessGatesNotReady"

func GenerateContainersReadyCondition Uses

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 Uses

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 Uses

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 NeedToReconcilePodReadiness Uses

func NeedToReconcilePodReadiness(pod *v1.Pod) bool

NeedToReconcilePodReadiness returns if the pod "Ready" condition need to be reconcile

type Manager Uses

type Manager interface {

    // Start the API server status sync loop.

    // SetPodStatus caches updates the cached status for the given pod, and triggers a status update.
    SetPodStatus(pod *v1.Pod, status v1.PodStatus)

    // SetContainerReadiness updates the cached container status with the given readiness, and
    // triggers a status update.
    SetContainerReadiness(podUID types.UID, containerID kubecontainer.ContainerID, ready bool)

    // SetContainerStartup updates the cached container status with the given startup, and
    // triggers a status update.
    SetContainerStartup(podUID types.UID, containerID kubecontainer.ContainerID, started bool)

    // TerminatePod resets the container status for the provided pod to terminated and triggers
    // a status update.
    TerminatePod(pod *v1.Pod)

    // RemoveOrphanedStatuses scans the status cache and removes any entries for pods not included in
    // the provided podUIDs.
    RemoveOrphanedStatuses(podUIDs map[types.UID]bool)

Manager is the Source of truth for kubelet pod status, and should be kept up-to-date with the latest v1.PodStatus. It also syncs updates back to the API server.

func NewManager Uses

func NewManager(kubeClient clientset.Interface, podManager kubepod.Manager, podDeletionSafety PodDeletionSafetyProvider) Manager

type PodDeletionSafetyProvider Uses

type PodDeletionSafetyProvider interface {
    // A function which returns true if the pod can safely be deleted
    PodResourcesAreReclaimed(pod *v1.Pod, status v1.PodStatus) bool

An object which provides guarantees that a pod can be safely deleted.

type PodStatusProvider Uses

type PodStatusProvider interface {
    // GetPodStatus returns the cached status for the provided pod UID, as well as whether it
    // was a cache hit.
    GetPodStatus(uid types.UID) (v1.PodStatus, bool)

PodStatusProvider knows how to provide status for a pod. It's intended to be used by other components that need to introspect status.



Package status imports 20 packages (graph) and is imported by 305 packages. Updated 2019-09-13. Refresh now. Tools for package owners.