kuberuntime

package
v0.0.0-...-89e5b94 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 55 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// These limits are defined in the kernel:
	// https://github.com/torvalds/linux/blob/0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7/kernel/sched/sched.h#L427-L428
	MinShares = 2
	MaxShares = 262144

	SharesPerCPU  = 1024
	MilliCPUToCPU = 1000

	// 100000 is equivalent to 100ms
	QuotaPeriod    = 100000
	MinQuotaPeriod = 1000
)

Variables

View Source
var (
	// ErrCreateContainerConfig - failed to create container config
	ErrCreateContainerConfig = errors.New("CreateContainerConfigError")
	// ErrCreateContainer - failed to create container
	ErrCreateContainer = errors.New("CreateContainerError")
)
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

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

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

func BuildPodLogsDirectory

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

BuildPodLogsDirectory builds absolute log directory path for a pod sandbox.

func MilliCPUToShares

func MilliCPUToShares(milliCPU int64) uint64

MilliCPUToShares converts the milliCPU to CFS shares.

func NewManager

func NewManager(recorder record.EventRecorder,
	livenessManager proberesults.Manager,
	readinessManager proberesults.Manager,
	startupManager proberesults.Manager,
	podStateProvider podStateProvider,
	osInterface pkgcontainer.OSInterface,
	logManager logs.ContainerLogManager,
	runtimeHelper pkgcontainer.RuntimeHelper,
	runtimeService internalapi.RuntimeService,
	imageService internalapi.ImageManagerService,
	imageBackOff *flowcontrol.Backoff,
	serializeImagePulls bool,
	imagePullQPS float32,
	imagePullBurst int,
	cpuCFSQuota bool,
	podStdoutRootDirectory string,
	allowPrivileged bool,
	agentRuntime string) (pkgcontainer.Runtime, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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