Documentation ¶
Index ¶
- Constants
- Variables
- func BuildContainerLogsDirectory(rootDirectory, podNamespace, podName string, podUID types.UID, ...) string
- func BuildContainerLogsPath(containerName string, restartCount int) string
- func BuildPodLogsDirectory(rootDirectory, podNamespace, podName string, podUID types.UID) string
- func CalcRestartCountByLogDir(path string) (int, error)
- func MilliCPUToShares(milliCPU int64) uint64
- func NewManager(recorder record.EventRecorder, livenessManager proberesults.Manager, ...) (pkgcontainer.Runtime, error)
Constants ¶
View Source
const ( // These limits are defined in the kernel: // https://github.com/torvalds/linux/blob/0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7/kernel/sched/sched.h#L427-L428 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 BuildContainerLogsPath ¶
buildContainerLogsPath builds log path for container relative to pod logs directory.
func BuildPodLogsDirectory ¶
BuildPodLogsDirectory builds absolute log directory path for a pod sandbox.
func MilliCPUToShares ¶
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.
Click to show internal directories.
Click to hide internal directories.