kubernetesk8s.io/kubernetes/pkg/kubelet/kuberuntime Index | Files | Directories

package kuberuntime

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

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

Index

Variables

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")
)
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

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

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

BuildPodLogsDirectory builds absolute log directory path for a pod sandbox.

func GetHugepageLimitsFromResources

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

GetHugepageLimitsFromResources returns limits of each hugepages from resources.

func GetStableKey

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

func IsInPlacePodVerticalScalingAllowed(pod *v1.Pod) (allowed bool, msg string)

Types

type KubeGenericRuntime

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,
	imagePullsCredentialVerificationPolicy string,
	preloadedImagesCredentialVerificationWhitelist []string,
	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,
	allocationManager allocation.Manager,
	seccompDefault bool,
	memorySwapBehavior string,
	getNodeAllocatable func() v1.ResourceList,
	memoryThrottlingFactor float64,
	podPullingTimeRecorder images.ImagePodPullingTimeRecorder,
	tracerProvider trace.TracerProvider,
	tokenManager *token.Manager,
	getServiceAccount plugin.GetServiceAccountFunc,
) (KubeGenericRuntime, []images.PostImageGCHook, error)

NewKubeGenericRuntimeManager creates a new kubeGenericRuntimeManager

Source Files

convert.go doc.go fake_kuberuntime_manager.go features_linux.go helpers.go helpers_linux.go instrumented_services.go kuberuntime_container.go kuberuntime_container_linux.go kuberuntime_gc.go kuberuntime_image.go kuberuntime_logs.go kuberuntime_manager.go kuberuntime_sandbox.go kuberuntime_sandbox_linux.go kuberuntime_termination_order.go labels.go legacy.go security_context.go security_context_others.go

Directories

PathSynopsis
pkg/kubelet/kuberuntime/util
Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
79 packages
Last checked
3 hours ago

Tools for package owners.