outofband

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricAddPodTimeout    = "ORM_add_pod_timeout"
	MetricDeletePodTImeout = "ORM_delete_pod_timeout"

	MainContainerNameAnnotationKey = "kubernetes.io/main-container-name"

	KubeletPluginsDirSELinuxLabel = "system_u:object_r:container_file_t:s0"
)

Variables

View Source
var EmptyValue = reflect.Value{}

Functions

func GetContainerTypeAndIndex

func GetContainerTypeAndIndex(pod *v1.Pod, container *v1.Container) (containerType pluginapi.ContainerType, containerIndex uint64, err error)

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) DeRegisterPlugin

func (m *ManagerImpl) DeRegisterPlugin(pluginName string)

DeRegisterPlugin deregisters the plugin

func (*ManagerImpl) GetHandlerType

func (m *ManagerImpl) GetHandlerType() string

func (*ManagerImpl) IsContainerRequestResource

func (m *ManagerImpl) IsContainerRequestResource(container *v1.Container, resourceName string) (bool, error)

func (*ManagerImpl) Register

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) Run

func (m *ManagerImpl) Run(ctx context.Context)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL