kubernetes: k8s.io/kubernetes/pkg/kubelet/images Index | Files

package images

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

Package images is responsible for managing lifecycle of container images.

Index

Package Files

doc.go helpers.go image_gc_manager.go image_manager.go puller.go types.go

Variables

var (
    // ErrImagePullBackOff - Container image pull failed, kubelet is backing off image pull
    ErrImagePullBackOff = errors.New("ImagePullBackOff")

    // ErrImageInspect - Unable to inspect image
    ErrImageInspect = errors.New("ImageInspectError")

    // ErrImagePull - General image pull error
    ErrImagePull = errors.New("ErrImagePull")

    // ErrImageNeverPull - Required Image is absent on host and PullPolicy is NeverPullImage
    ErrImageNeverPull = errors.New("ErrImageNeverPull")

    // ErrRegistryUnavailable - Get http error when pulling image from registry
    ErrRegistryUnavailable = errors.New("RegistryUnavailable")

    // ErrInvalidImageName - Unable to parse the image name.
    ErrInvalidImageName = errors.New("InvalidImageName")
)

type ImageGCManager Uses

type ImageGCManager interface {
    // Applies the garbage collection policy. Errors include being unable to free
    // enough space as per the garbage collection policy.
    GarbageCollect() error

    // Start async garbage collection of images.
    Start()

    GetImageList() ([]container.Image, error)

    // Delete all unused images.
    DeleteUnusedImages() error
}

ImageGCManager is an interface for managing lifecycle of all images. Implementation is thread-safe.

func NewImageGCManager Uses

func NewImageGCManager(runtime container.Runtime, statsProvider StatsProvider, recorder record.EventRecorder, nodeRef *v1.ObjectReference, policy ImageGCPolicy, sandboxImage string) (ImageGCManager, error)

NewImageGCManager instantiates a new ImageGCManager object.

type ImageGCPolicy Uses

type ImageGCPolicy struct {
    // Any usage above this threshold will always trigger garbage collection.
    // This is the highest usage we will allow.
    HighThresholdPercent int

    // Any usage below this threshold will never trigger garbage collection.
    // This is the lowest threshold we will try to garbage collect to.
    LowThresholdPercent int

    // Minimum age at which an image can be garbage collected.
    MinAge time.Duration
}

ImageGCPolicy is a policy for garbage collecting images. Policy defines an allowed band in which garbage collection will be run.

type ImageManager Uses

type ImageManager interface {
    // EnsureImageExists ensures that image specified in `container` exists.
    EnsureImageExists(pod *v1.Pod, container *v1.Container, pullSecrets []v1.Secret, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, string, error)
}

ImageManager provides an interface to manage the lifecycle of images. Implementations of this interface are expected to deal with pulling (downloading), managing, and deleting container images. Implementations are expected to abstract the underlying runtimes. Implementations are expected to be thread safe.

func NewImageManager Uses

func NewImageManager(recorder record.EventRecorder, imageService kubecontainer.ImageService, imageBackOff *flowcontrol.Backoff, serialized bool, qps float32, burst int) ImageManager

NewImageManager instantiates a new ImageManager object.

type StatsProvider Uses

type StatsProvider interface {
    // ImageFsStats returns the stats of the image filesystem.
    ImageFsStats() (*statsapi.FsStats, error)
}

StatsProvider is an interface for fetching stats used during image garbage collection.

Package images imports 20 packages (graph) and is imported by 78 packages. Updated 2019-07-22. Refresh now. Tools for package owners.