kubernetesk8s.io/kubernetes/pkg/kubelet/cm/cpumanager Index | Files | Directories

package cpumanager

import "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager"

Index

Types

type ActivePodsFunc

type ActivePodsFunc func() []*v1.Pod

ActivePodsFunc is a function that returns a list of pods to reconcile.

type Manager

type Manager interface {
	// Start is called during Kubelet initialization.
	Start(activePods ActivePodsFunc, podStatusProvider status.PodStatusProvider, containerRuntime runtimeService)

	// AddContainer is called between container create and container start
	// so that initial CPU affinity settings can be written through to the
	// container runtime before the first process begins to execute.
	AddContainer(p *v1.Pod, c *v1.Container, containerID string) error

	// RemoveContainer is called after Kubelet decides to kill or delete a
	// container. After this call, the CPU manager stops trying to reconcile
	// that container and any CPUs dedicated to the container are freed.
	RemoveContainer(containerID string) error

	// State returns a read-only interface to the internal CPU manager state.
	State() state.Reader
}

Manager interface provides methods for Kubelet to manage pod cpus.

type Policy

type Policy interface {
	Name() string
	Start(s state.State)
	AddContainer(s state.State, pod *v1.Pod, container *v1.Container, containerID string) error
	RemoveContainer(s state.State, containerID string) error
}

Policy implements logic for pod container to CPU assignment.

Source Files

cpu_manager.go policy.go

Directories

PathSynopsis
pkg/kubelet/cm/cpumanager/state
pkg/kubelet/cm/cpumanager/topologyPackage topology contains helpers for the CPU manager.
Version
v1.8.0-beta.0
Published
Sep 2, 2017
Platform
js/wasm
Imports
4 packages
Last checked
3 minutes ago

Tools for package owners.