Documentation ¶
Index ¶
- Constants
- Variables
- func GetContainerTypeAndIndex(pod *v1.Pod, container *v1.Container) (containerType pluginapi.ContainerType, containerIndex uint64, err error)
- type ContainerResources
- type ManagerImpl
- func (m *ManagerImpl) DeRegisterPlugin(pluginName string)
- func (m *ManagerImpl) GetHandlerType() string
- 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) Run(ctx context.Context)
- 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" MainContainerNameAnnotationKey = "kubernetes.io/main-container-name" KubeletPluginsDirSELinuxLabel = "system_u:object_r:container_file_t:s0" )
Variables ¶
View Source
var EmptyValue = reflect.Value{}
Functions ¶
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 (*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) 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.