kubernetes: k8s.io/kubernetes/pkg/kubelet/cm/topologymanager Index | Files | Directories

package topologymanager

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

Index

Package Files

fake_topology_manager.go policy.go policy_none.go policy_preferred.go policy_strict.go topology_manager.go

Constants

const PolicyNone string = "none"

PolicyNone policy name.

const PolicyPreferred string = "preferred"

PolicyPreferred policy name.

const PolicyStrict string = "strict"

PolicyStrict policy name.

type HintProvider Uses

type HintProvider interface {
    GetTopologyHints(pod v1.Pod, container v1.Container) []TopologyHint
}

HintProvider interface is to be implemented by Hint Providers

type Manager Uses

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 Uses

func NewFakeManager() Manager

NewFakeManager returns an instance of FakeManager

func NewManager Uses

func NewManager(topologyPolicyName string) (Manager, error)

NewManager creates a new TopologyManager based on provided policy

type Policy Uses

type Policy interface {
    //Returns Policy Name
    Name() string
    //Returns Pod Admit Handler Response based on hints and policy type
    CanAdmitPodResult(admit bool) lifecycle.PodAdmitResult
}

Policy interface for Topology Manager Pod Admit Result

func NewNonePolicy Uses

func NewNonePolicy() Policy

NewNonePolicy returns none policy.

func NewPreferredPolicy Uses

func NewPreferredPolicy() Policy

NewPreferredPolicy returns preferred policy.

func NewStrictPolicy Uses

func NewStrictPolicy() Policy

NewStrictPolicy returns strict policy.

type Store Uses

type Store interface {
    GetAffinity(podUID string, containerName string) TopologyHint
}

Store interface is to allow Hint Providers to retrieve pod affinity

type TopologyHint Uses

type TopologyHint struct {
    SocketAffinity socketmask.SocketMask
    // Preferred is set to true when the SocketMask encodes a preferred
    // allocation for the Container. It is set to false otherwise.
    Preferred bool
}

TopologyHint is a struct containing a SocketMask for a Container

Directories

PathSynopsis
socketmask

Package topologymanager imports 5 packages (graph). Updated 2019-07-23. Refresh now. Tools for package owners.