package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Functions
AllContainersAreWindowsHostProcess returns true if all containers in a pod are HostProcess containers.
BuildContainerID returns the ContainerID given type and id.
BuildPodFullName builds the pod full name from pod name and namespace.
ConvertPodStatusToRunningPod returns Pod given PodStatus and container runtime string.
ExpandContainerCommandAndArgs expands the given Container's command by replacing variable references `with the values of given EnvVar.
ExpandContainerCommandOnlyStatic substitutes only static environment variable values from the container environment definitions.
ExpandContainerVolumeMounts expands the subpath of the given VolumeMount by replacing variable references with the values of given EnvVar.
FilterEventRecorder creates an event recorder to record object's event except implicitly required container's, like infra container.
GenerateContainerRef returns an *v1.ObjectReference which references the given container within the given pod.
GetContainerSpec gets the container spec by containerName.
GetPodFullName returns a name that uniquely identifies a pod.
HasAnyRegularContainerStarted returns true if any regular container has started, which indicates all init containers have been initialized.
HashContainer returns the hash of the container.
HasPrivilegedContainer returns true if any of the containers in the pod are privileged.
HasWindowsHostProcessContainer returns true if any of the containers in a pod are HostProcess containers.
IsHostNetworkPod returns whether the host networking requested for the given Pod.
MakePortMappings creates internal port mapping from api port mapping.
NewCache creates a pod cache.
NewContainerGC creates a new instance of GC with the specified policy.
NewRuntimeCache creates a container runtime cache.
NewSyncResult generates new SyncResult with specific Action and Target.
NewTestRuntimeCache creates a new instance of TestRuntimeCache.
ParseContainerID is a convenience method for creating a ContainerID from an ID string.
ParsePodFullName parsed the pod full name.
SandboxToContainerState converts runtimeapi.PodSandboxState to kubecontainer.State.
ShouldContainerBeRestarted checks whether a container needs to be restarted.
# Constants
ConfigPodSandbox action.
ContainerReasonStatusUnknown indicates a container the status of the container cannot be determined.
ContainerStateCreated indicates a container that has been created (e.g.
ContainerStateExited indicates a container that ran and completed ("stopped" in other contexts, although a created container is technically also "stopped").
ContainerStateRunning indicates a currently running container.
ContainerStateUnknown encompasses all the states that we currently don't care about (like restarting, paused, dead).
CreatePodSandbox action.
InitContainer action.
KillContainer action.
KillPodSandbox action.
MaxContainerTerminationMessageLength is the upper bound any one container may write to its termination message path.
MaxContainerTerminationMessageLogLength is the maximum bytes any one container will have written to its termination message when the message is read from the logs.
MaxContainerTerminationMessageLogLines is the maximum number of previous lines of log output that the termination message can contain.
MaxPodTerminationMessageLogLength is the maximum bytes any one pod may have written as termination message output across all containers.
NetworkReady means the runtime network is up and ready to accept containers which require network.
RuntimeReady means the runtime is up and ready to accept basic containers.
SetupNetwork action.
StartContainer action.
TeardownNetwork action.
# Variables
ErrConfigPodSandbox returned when runetime failed to get pod sandbox config from pod.
ErrContainerNotFound returned when a container in the given pod with the given container name was not found, amongst those managed by the kubelet.
ErrCrashLoopBackOff returned when a container Terminated and Kubelet is backing off the restart.
ErrCreatePodSandbox returned when runtime failed to create a sandbox for pod.
ErrKillContainer returned when runtime failed to kill any of pod's containers.
ErrKillPodSandbox returned when runtime failed to stop pod's sandbox.
ErrRunContainer returned when runtime failed to start any of pod's container.
ImplicitContainerPrefix is a container name prefix that will indicate that container was started implicitly (like the pod infra container).
# Structs
Annotation represents an annotation.
CDIDevice contains information about CDI device.
Container provides the runtime information for a container, such as ID, hash, state of the container.
ContainerID is a type that identifies a container.
ContainerResources represents the Resources allocated to the running container.
ContainerUser represents user identity information.
DeviceInfo contains information about the device.
EnvVar represents the environment variable.
GCPolicy specifies a policy for garbage collecting containers.
Image contains basic information about a container image.
ImageSpec is an internal representation of an image.
ImageStats contains statistics about all the images currently available.
LinuxContainerUser represents user identity information in Linux containers.
Mount represents a volume mount.
Pod is a group of containers.
PodPair contains both runtime#Pod and api#Pod.
PodStatus represents the status of the pod and its containers.
PodSyncResult is the summary result of SyncPod() and KillPod().
PortMapping contains information about the port mapping.
RealOS is used to dispatch the real system level operations.
RunContainerOptions specify the options which are necessary for running containers.
RuntimeCondition contains condition information for the runtime.
RuntimeFeatures contains the set of features implemented by the runtime.
RuntimeHandler contains condition information for the runtime handler.
RuntimeStatus contains the status of the runtime.
Status represents the status of a container.
SyncResult is the result of sync action.
TestRuntimeCache embeds runtimeCache with some additional methods for testing.
VolumeInfo contains information about the volume.
# Interfaces
Attacher interface allows to attach a container.
Cache stores the PodStatus for the pods.
CommandRunner interface allows to run command in a container.
GC manages garbage collection of dead containers.
HandlerRunner runs a lifecycle handler for a container.
ImageService interfaces allows to work with image service.
OSInterface collects system level operations that need to be mocked out during tests.
Runtime interface defines the interfaces that should be implemented by a container runtime.
RuntimeCache is in interface for obtaining cached Pods.
RuntimeHelper wraps kubelet to make container runtime able to get necessary informations like the RunContainerOptions, DNS settings, Host IP.
SourcesReadyProvider knows how to determine if configuration sources are ready.
StreamingRuntime is the interface implemented by runtimes that handle the serving of the streaming calls (exec/attach/port-forward) themselves.
Version interface allow to consume the runtime versions - compare and format to string.
# Type aliases
ImageVolumes is a map of image specs by volume name.
Option is a functional option type for Runtime, useful for completely optional settings.
Pods represents the list of pods.
RuntimeConditionType is the types of required runtime conditions.
SortContainerStatusesByCreationTime sorts the container statuses by creation time.
State represents the state of a container.
SyncAction indicates different kind of actions in SyncPod() and KillPod().
VolumeMap represents the map of volumes.