kuberuntime

package
v1.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 77 Imported by: 83

Documentation

Overview

Package kuberuntime contains an implementation of kubecontainer.Runtime using the interface in pkg/kubelet/v1.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCreateContainerConfig - failed to create container config
	ErrCreateContainerConfig = errors.New("CreateContainerConfigError")
	// ErrPreCreateHook - failed to execute PreCreateHook
	ErrPreCreateHook = errors.New("PreCreateHookError")
	// ErrCreateContainer - failed to create container
	ErrCreateContainer = errors.New("CreateContainerError")
	// ErrPreStartHook - failed to execute PreStartHook
	ErrPreStartHook = errors.New("PreStartHookError")
	// ErrPostStartHook - failed to execute PostStartHook
	ErrPostStartHook = errors.New("PostStartHookError")
)
View Source
var (
	// ErrVersionNotSupported is returned when the api version of runtime interface is not supported
	ErrVersionNotSupported = errors.New("runtime api version is not supported")
)

Functions

func BuildContainerLogsDirectory added in v1.10.0

func BuildContainerLogsDirectory(podLogsDir, podNamespace, podName string, podUID types.UID, containerName string) string

BuildContainerLogsDirectory builds absolute log directory path for a container in pod.

func BuildPodLogsDirectory added in v1.14.0

func BuildPodLogsDirectory(podLogsDir, podNamespace, podName string, podUID types.UID) string

BuildPodLogsDirectory builds absolute log directory path for a pod sandbox.

func GetHugepageLimitsFromResources added in v1.18.0

func GetHugepageLimitsFromResources(resources v1.ResourceRequirements) []*runtimeapi.HugepageLimit

GetHugepageLimitsFromResources returns limits of each hugepages from resources.

func GetStableKey added in v1.32.0

func GetStableKey(pod *v1.Pod, container *v1.Container) string

GetStableKey generates a key (string) to uniquely identify a (pod, container) tuple. The key should include the content of the container, so that any change to the container generates a new key.

func IsInPlacePodVerticalScalingAllowed added in v1.32.0

func IsInPlacePodVerticalScalingAllowed(pod *v1.Pod) bool

Types

type KubeGenericRuntime added in v1.5.0

KubeGenericRuntime is a interface contains interfaces for container runtime and command.

func NewKubeGenericRuntimeManager

func NewKubeGenericRuntimeManager(
	recorder record.EventRecorder,
	livenessManager proberesults.Manager,
	readinessManager proberesults.Manager,
	startupManager proberesults.Manager,
	rootDirectory string,
	podLogsDirectory string,
	machineInfo *cadvisorapi.MachineInfo,
	podStateProvider podStateProvider,
	osInterface kubecontainer.OSInterface,
	runtimeHelper kubecontainer.RuntimeHelper,
	insecureContainerLifecycleHTTPClient types.HTTPDoer,
	imageBackOff *flowcontrol.Backoff,
	serializeImagePulls bool,
	maxParallelImagePulls *int32,
	imagePullQPS float32,
	imagePullBurst int,
	imageCredentialProviderConfigFile string,
	imageCredentialProviderBinDir string,
	singleProcessOOMKill *bool,
	cpuCFSQuota bool,
	cpuCFSQuotaPeriod metav1.Duration,
	runtimeService internalapi.RuntimeService,
	imageService internalapi.ImageManagerService,
	containerManager cm.ContainerManager,
	logManager logs.ContainerLogManager,
	runtimeClassManager *runtimeclass.Manager,
	seccompDefault bool,
	memorySwapBehavior string,
	getNodeAllocatable func() v1.ResourceList,
	memoryThrottlingFactor float64,
	podPullingTimeRecorder images.ImagePodPullingTimeRecorder,
	tracerProvider trace.TracerProvider,
) (KubeGenericRuntime, error)

NewKubeGenericRuntimeManager creates a new kubeGenericRuntimeManager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL