package topologymanager
import "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager"
Index ¶
- Constants
- type HintProvider
- type Manager
- func NewFakeManager() Manager
- func NewManager(numaNodeInfo cputopology.NUMANodeInfo, topologyPolicyName string) (Manager, error)
- type Policy
- func NewBestEffortPolicy() Policy
- func NewNonePolicy() Policy
- func NewRestrictedPolicy() Policy
- func NewSingleNumaNodePolicy() Policy
- type Store
- type TopologyHint
Constants ¶
const PolicyBestEffort string = "best-effort"
PolicyBestEffort policy name.
const PolicyNone string = "none"
PolicyNone policy name.
const PolicyRestricted string = "restricted"
PolicyRestricted policy name.
const PolicySingleNumaNode string = "single-numa-node"
PolicySingleNumaNode policy name.
Types ¶
type HintProvider ¶
type HintProvider interface { GetTopologyHints(pod v1.Pod, container v1.Container) map[string][]TopologyHint }
HintProvider interface is to be implemented by Hint Providers
type Manager ¶
type Manager interface { //Manager implements pod admit handler interface lifecycle.PodAdmitHandler //Adds a hint provider to manager to indicate the hint provider //wants to be consoluted when making topology hints AddHintProvider(HintProvider) //Adds pod to Manager for tracking AddContainer(pod *v1.Pod, containerID string) error //Removes pod from Manager tracking RemoveContainer(containerID string) error //Interface for storing pod topology hints Store }
Manager interface provides methods for Kubelet to manage pod topology hints
func NewFakeManager ¶
func NewFakeManager() Manager
NewFakeManager returns an instance of FakeManager
func NewManager ¶
func NewManager(numaNodeInfo cputopology.NUMANodeInfo, topologyPolicyName string) (Manager, error)
NewManager creates a new TopologyManager based on provided policy
type Policy ¶
type Policy interface { //Returns Policy Name Name() string //Returns Pod Admit Handler Response based on hints and policy type CanAdmitPodResult(hint *TopologyHint) lifecycle.PodAdmitResult }
Policy interface for Topology Manager Pod Admit Result
func NewBestEffortPolicy ¶
func NewBestEffortPolicy() Policy
NewBestEffortPolicy returns best-effort policy.
func NewNonePolicy ¶
func NewNonePolicy() Policy
NewNonePolicy returns none policy.
func NewRestrictedPolicy ¶
func NewRestrictedPolicy() Policy
NewRestrictedPolicy returns restricted policy.
func NewSingleNumaNodePolicy ¶
func NewSingleNumaNodePolicy() Policy
NewSingleNumaNodePolicy returns single-numa-node policy.
type Store ¶
type Store interface { GetAffinity(podUID string, containerName string) TopologyHint }
Store interface is to allow Hint Providers to retrieve pod affinity
type TopologyHint ¶
type TopologyHint struct { NUMANodeAffinity socketmask.SocketMask // Preferred is set to true when the NUMANodeAffinity encodes a preferred // allocation for the Container. It is set to false otherwise. Preferred bool }
TopologyHint is a struct containing the NUMANodeAffinity for a Container
Source Files ¶
fake_topology_manager.go policy.go policy_best_effort.go policy_none.go policy_restricted.go policy_single_numa_node.go topology_manager.go
Directories ¶
Path | Synopsis |
---|---|
pkg/kubelet/cm/topologymanager/socketmask |
- Version
- v1.16.2-beta.0
- Published
- Oct 2, 2019
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 3 minutes ago –
Tools for package owners.