Documentation ¶
Index ¶
- Constants
- Variables
- func GetContainerTypeAndIndex(pod *v1.Pod, container *v1.Container) (containerType pluginapi.ContainerType, containerIndex uint64, err error)
- func ParseListOfTopologyHints(hintsList *pluginapi.ListOfTopologyHints) []topology.TopologyHint
- func ParseTopologyManagerHint(hint topology.TopologyHint) *pluginapi.TopologyHint
- type ContainerResources
- type ManagerImpl
- func (m *ManagerImpl) Allocate(pod *v1.Pod, container *v1.Container) error
- func (m *ManagerImpl) Configure(_ context.Context, config, runtime, version string) (stub.EventMask, error)
- func (m *ManagerImpl) CreateContainer(_ context.Context, pod *api.PodSandbox, container *api.Container) (*api.ContainerAdjustment, []*api.ContainerUpdate, error)
- func (m *ManagerImpl) DeRegisterPlugin(pluginName string)
- func (m *ManagerImpl) GetHandlerType() string
- func (m *ManagerImpl) GetPodTopologyHints(pod *v1.Pod) map[string][]topology.TopologyHint
- func (m *ManagerImpl) GetTopologyAwareAllocatableResources() []*podresourcesapi.AllocatableTopologyAwareResource
- func (m *ManagerImpl) GetTopologyAwareResources(pod *v1.Pod, container *v1.Container) []*podresourcesapi.TopologyAwareResource
- func (m *ManagerImpl) GetTopologyHints(pod *v1.Pod, container *v1.Container) map[string][]topology.TopologyHint
- func (m *ManagerImpl) IsContainerRequestResource(container *v1.Container, resourceName string) (bool, error)
- func (m *ManagerImpl) Register(ctx context.Context, r *pluginapi.RegisterRequest) (*pluginapi.Empty, error)
- func (m *ManagerImpl) RegisterPlugin(pluginName string, endpoint string, versions []string) error
- func (m *ManagerImpl) RemovePodSandbox(_ context.Context, pod *api.PodSandbox) error
- func (m *ManagerImpl) Run(ctx context.Context)
- func (m *ManagerImpl) RunPodSandbox(_ context.Context, pod *api.PodSandbox) error
- func (m *ManagerImpl) Synchronize(_ context.Context, pods []*api.PodSandbox, containers []*api.Container) ([]*api.ContainerUpdate, error)
- func (m *ManagerImpl) UpdateAllocatedResources()
- func (m *ManagerImpl) UpdateContainer(_ context.Context, pod *api.PodSandbox, container *api.Container, ...) ([]*api.ContainerUpdate, error)
- func (m *ManagerImpl) UpdatePodResources(resourceAllocation map[string]*pluginapi.ResourceAllocationInfo, pod *v1.Pod, ...)
- func (m *ManagerImpl) ValidatePlugin(pluginName string, endpoint string, versions []string) error
- type PodResources
- type ResourceAllocation
Constants ¶
View Source
const ( MetricAddPodTimeout = "ORM_add_pod_timeout" MetricDeletePodTImeout = "ORM_delete_pod_timeout" MetricGetTopologyAwareResourcesFail = "ORM_get_topology_aware_resource_fail" MetricGetTopologyAwareAllocatableResourcesFail = "ORM_get_topology_aware_allocatable_resource_fail" MetricUpdateAllocatedResourcesFail = "ORM_update_allocatabled_resources_fail" MainContainerNameAnnotationKey = "kubernetes.io/main-container-name" KubeletPluginsDirSELinuxLabel = "system_u:object_r:container_file_t:s0" )
View Source
const (
NoneDevicesProvider = ""
)
View Source
const (
ORMAgentName = "katalyst-agent-orm"
)
Variables ¶
View Source
var EmptyValue = reflect.Value{}
Functions ¶
func ParseListOfTopologyHints ¶
func ParseListOfTopologyHints(hintsList *pluginapi.ListOfTopologyHints) []topology.TopologyHint
func ParseTopologyManagerHint ¶
func ParseTopologyManagerHint(hint topology.TopologyHint) *pluginapi.TopologyHint
Types ¶
type ContainerResources ¶
type ContainerResources map[string]ResourceAllocation // Keyed by containerName.
func (ContainerResources) DeepCopy ¶
func (cr ContainerResources) DeepCopy() ContainerResources
type ManagerImpl ¶
type ManagerImpl struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(socketPath string, emitter metrics.MetricEmitter, metaServer *metaserver.MetaServer, config *config.Configuration, ) (*ManagerImpl, error)
func (*ManagerImpl) CreateContainer ¶ added in v0.5.6
func (m *ManagerImpl) CreateContainer(_ context.Context, pod *api.PodSandbox, container *api.Container) ( *api.ContainerAdjustment, []*api.ContainerUpdate, error, )
func (*ManagerImpl) DeRegisterPlugin ¶
func (m *ManagerImpl) DeRegisterPlugin(pluginName string)
DeRegisterPlugin deregisters the plugin
func (*ManagerImpl) GetHandlerType ¶
func (m *ManagerImpl) GetHandlerType() string
func (*ManagerImpl) GetPodTopologyHints ¶
func (m *ManagerImpl) GetPodTopologyHints(pod *v1.Pod) map[string][]topology.TopologyHint
func (*ManagerImpl) GetTopologyAwareAllocatableResources ¶ added in v0.4.2
func (m *ManagerImpl) GetTopologyAwareAllocatableResources() []*podresourcesapi.AllocatableTopologyAwareResource
func (*ManagerImpl) GetTopologyAwareResources ¶ added in v0.4.2
func (m *ManagerImpl) GetTopologyAwareResources(pod *v1.Pod, container *v1.Container) []*podresourcesapi.TopologyAwareResource
func (*ManagerImpl) GetTopologyHints ¶
func (m *ManagerImpl) GetTopologyHints(pod *v1.Pod, container *v1.Container) map[string][]topology.TopologyHint
func (*ManagerImpl) IsContainerRequestResource ¶
func (*ManagerImpl) Register ¶
func (m *ManagerImpl) Register(ctx context.Context, r *pluginapi.RegisterRequest) (*pluginapi.Empty, error)
Register registers a resource plugin.
func (*ManagerImpl) RegisterPlugin ¶
func (m *ManagerImpl) RegisterPlugin(pluginName string, endpoint string, versions []string) error
RegisterPlugin starts the endpoint and registers it
func (*ManagerImpl) RemovePodSandbox ¶ added in v0.5.6
func (m *ManagerImpl) RemovePodSandbox(_ context.Context, pod *api.PodSandbox) error
func (*ManagerImpl) Run ¶
func (m *ManagerImpl) Run(ctx context.Context)
func (*ManagerImpl) RunPodSandbox ¶ added in v0.5.6
func (m *ManagerImpl) RunPodSandbox(_ context.Context, pod *api.PodSandbox) error
func (*ManagerImpl) Synchronize ¶ added in v0.5.6
func (m *ManagerImpl) Synchronize(_ context.Context, pods []*api.PodSandbox, containers []*api.Container) ( []*api.ContainerUpdate, error, )
func (*ManagerImpl) UpdateAllocatedResources ¶ added in v0.4.2
func (m *ManagerImpl) UpdateAllocatedResources()
UpdateAllocatedResources process add pods and delete pods synchronously.
func (*ManagerImpl) UpdateContainer ¶ added in v0.5.6
func (m *ManagerImpl) UpdateContainer(_ context.Context, pod *api.PodSandbox, container *api.Container, r *api.LinuxResources, ) ([]*api.ContainerUpdate, error)
func (*ManagerImpl) UpdatePodResources ¶
func (m *ManagerImpl) UpdatePodResources( resourceAllocation map[string]*pluginapi.ResourceAllocationInfo, pod *v1.Pod, container *v1.Container, resource string, )
func (*ManagerImpl) ValidatePlugin ¶
func (m *ManagerImpl) ValidatePlugin(pluginName string, endpoint string, versions []string) error
ValidatePlugin validates a plugin if the version is correct and the name has the format of an extended resource
type PodResources ¶
type PodResources map[string]ContainerResources // Keyed by podUID
func (PodResources) DeepCopy ¶
func (pr PodResources) DeepCopy() PodResources
type ResourceAllocation ¶
type ResourceAllocation map[string]*pluginapi.ResourceAllocationInfo // Keyed by resourceName.
func (ResourceAllocation) DeepCopy ¶
func (ra ResourceAllocation) DeepCopy() ResourceAllocation
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
deviceprovider
|
|
podresources/testing
Package testing is a generated GoMock package.
|
Package testing is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.