kubernetes: github.com/MustWin/kubernetes/pkg/kubelet/status Index | Files

package status

import "github.com/MustWin/kubernetes/pkg/kubelet/status"

Index

Package Files

generate.go status_manager.go

func GeneratePodInitializedCondition Uses

func GeneratePodInitializedCondition(spec *api.PodSpec, containerStatuses []api.ContainerStatus, podPhase api.PodPhase) api.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 *api.PodSpec, containerStatuses []api.ContainerStatus, podPhase api.PodPhase) api.PodCondition

GeneratePodReadyCondition returns ready condition if all containers in a pod are ready, else it returns an unready condition.

type Manager Uses

type Manager interface {
    PodStatusProvider

    // Start the API server status sync loop.
    Start()

    // SetPodStatus caches updates the cached status for the given pod, and triggers a status update.
    SetPodStatus(pod *api.Pod, status api.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)

    // TerminatePod resets the container status for the provided pod to terminated and triggers
    // a status update.
    TerminatePod(pod *api.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 api.PodStatus. It also syncs updates back to the API server.

func NewManager Uses

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

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) (api.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 17 packages (graph). Updated 2017-07-12. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).