Documentation
¶
Index ¶
- Constants
- Variables
- func CycleCleanupNodeResources(kubeClient *kubernetes.Clientset, nodeName string, resources []string)
- func GetContManagerDirectoryPath(podUID types.UID, containerName string) string
- func GetHostManagerDirectoryPath(podUID types.UID, containerName string) string
- type Checkpoint
- type CheckpointData
- type CheckpointDataNUMA
- type CheckpointNUMA
- type DevicePlugin
- func InitDevicePlugins(opt *options.Options, devManager *manager.DeviceManager, ...) []DevicePlugin
- func NewVCoreDevicePlugin(resourceName, socket string, manager *manager.DeviceManager) DevicePlugin
- func NewVMemoryDevicePlugin(resourceName, socket string, manager *manager.DeviceManager) DevicePlugin
- func NewVNumberDevicePlugin(resourceName, socket string, manager *manager.DeviceManager, ...) DevicePlugin
- type DevicesPerNUMA
- type PodDevicesEntry
- type PodDevicesEntryNUMA
Constants ¶
View Source
const ( CheckPointFileName = "kubelet_internal_checkpoint" ContainerNameLabelKey = "io.kubernetes.container.name" PodNamespaceLabelKey = "io.kubernetes.pod.namespace" PodNameLabelKey = "io.kubernetes.pod.name" PodUIDLabelKey = "io.kubernetes.pod.uid" )
View Source
const ( VGPUConfigDirName = "config" HostProcDirectoryPath = "/proc" ContManagerDirectoryPath = "/etc/vgpu-manager" ContConfigDirectoryPath = ContManagerDirectoryPath + "/" + VGPUConfigDirName ContProcDirectoryPath = ContManagerDirectoryPath + "/.host_proc" ContCGroupDirectoryPath = ContManagerDirectoryPath + "/.host_cgroup" VGPULockDirName = "vgpu_lock" ContVGPULockPath = "/tmp/." + VGPULockDirName LdPreLoadFileName = "ld.so.preload" ContPreLoadFilePath = "/etc/" + LdPreLoadFileName VGPUControlFileName = "libvgpu-control.so" ContVGPUControlFilePath = ContManagerDirectoryPath + "/driver/" + VGPUControlFileName VGPUConfigFileName = "vgpu.config" DeviceListFileName = "devices.json" //NvidiaDeviceFilePrefix = "/dev/nvidia" NvidiaCTLFilePath = "/dev/nvidiactl" NvidiaUVMFilePath = "/dev/nvidia-uvm" NvidiaUVMToolsFilePath = "/dev/nvidia-uvm-tools" NvidiaModeSetFilePath = "/dev/nvidia-modeset" )
Variables ¶
View Source
var ( HostManagerDirectoryPath = os.Getenv("HOST_MANAGER_DIR") HostPreLoadFilePath = HostManagerDirectoryPath + "/" + LdPreLoadFileName HostVGPUControlFilePath = HostManagerDirectoryPath + "/" + VGPUControlFileName )
Functions ¶
func CycleCleanupNodeResources ¶
func CycleCleanupNodeResources(kubeClient *kubernetes.Clientset, nodeName string, resources []string)
CycleCleanupNodeResources Loop cleaning until the resource names on the node are completely deleted.
func GetContManagerDirectoryPath ¶ added in v0.3.0
Types ¶
type Checkpoint ¶
type Checkpoint struct {
PodDeviceEntries []PodDevicesEntry
RegisteredDevices map[string][]string
}
func GetCheckpointData ¶
func GetCheckpointData(devicePluginPath string) (*Checkpoint, error)
type CheckpointData ¶
type CheckpointData struct {
Data *Checkpoint `json:"Data"`
}
type CheckpointDataNUMA ¶
type CheckpointDataNUMA struct {
Data *CheckpointNUMA `json:"Data"`
}
type CheckpointNUMA ¶
type CheckpointNUMA struct {
PodDeviceEntries []PodDevicesEntryNUMA
RegisteredDevices map[string][]string
}
type DevicePlugin ¶
type DevicePlugin interface {
pluginapi.DevicePluginServer
// Name return device plugin name.
Name() string
// Start the plugin.
Start() error
// Stop the plugin.
Stop() error
// Devices return device list.
Devices() []*pluginapi.Device
}
func InitDevicePlugins ¶
func InitDevicePlugins(opt *options.Options, devManager *manager.DeviceManager, clusterManager ctrm.Manager, kubeClient *kubernetes.Clientset) []DevicePlugin
func NewVCoreDevicePlugin ¶
func NewVCoreDevicePlugin(resourceName, socket string, manager *manager.DeviceManager) DevicePlugin
NewVCoreDevicePlugin returns an initialized vcoreDevicePlugin
func NewVMemoryDevicePlugin ¶
func NewVMemoryDevicePlugin(resourceName, socket string, manager *manager.DeviceManager) DevicePlugin
NewVMemoryDevicePlugin returns an initialized vmemoryDevicePlugin
func NewVNumberDevicePlugin ¶
func NewVNumberDevicePlugin(resourceName, socket string, manager *manager.DeviceManager, kubeClient *kubernetes.Clientset, cache cache.Cache) DevicePlugin
NewVNumberDevicePlugin returns an initialized vnumberDevicePlugin
type DevicesPerNUMA ¶
type PodDevicesEntry ¶
type PodDevicesEntryNUMA ¶
type PodDevicesEntryNUMA struct {
PodUID string
ContainerName string
ResourceName string
DeviceIDs DevicesPerNUMA
AllocResp []byte
}
Click to show internal directories.
Click to hide internal directories.