device

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HandshakeAnnos  = map[string]string{}
	RegisterAnnos   = map[string]string{}
	DevicesToHandle []string
)
View Source
var DebugMode bool

Functions

func GetDevices

func GetDevices() map[string]Devices

func GlobalFlagSet

func GlobalFlagSet() *flag.FlagSet

func InitDevices

func InitDevices()

func PodAllocationFailed

func PodAllocationFailed(nodeName string, pod *corev1.Pod, lockname string)

func PodAllocationSuccess

func PodAllocationSuccess(nodeName string, pod *corev1.Pod, lockname string)

func PodAllocationTrySuccess

func PodAllocationTrySuccess(nodeName string, devName string, lockName string, pod *corev1.Pod)

Types

type Devices

type Devices interface {
	CommonWord() string
	MutateAdmission(ctr *corev1.Container) (bool, error)
	CheckHealth(devType string, n *corev1.Node) (bool, bool)
	NodeCleanUp(nn string) error
	GetNodeDevices(n corev1.Node) ([]*api.DeviceInfo, error)
	CheckType(annos map[string]string, d util.DeviceUsage, n util.ContainerDeviceRequest) (bool, bool, bool)
	// CheckUUID is check current device id whether in GPUUseUUID or GPUNoUseUUID set, return true is check success.
	CheckUUID(annos map[string]string, d util.DeviceUsage) bool
	LockNode(n *corev1.Node, p *corev1.Pod) error
	ReleaseNodeLock(n *corev1.Node, p *corev1.Pod) error
	GenerateResourceRequests(ctr *corev1.Container) util.ContainerDeviceRequest
	PatchAnnotations(annoinput *map[string]string, pd util.PodDevices) map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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