Documentation ¶
Index ¶
- Constants
- func NewSharedGPUManager(enableMPS, healthCheck, queryKubelet bool, bp MemoryUnit, ...) *sharedGPUManager
- func StackTrace(all bool) string
- type MemoryUnit
- type NvidiaDevicePlugin
- func (m *NvidiaDevicePlugin) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (m *NvidiaDevicePlugin) GetDeviceNameByIndex(index uint) (name string, found bool)
- func (m *NvidiaDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (m *NvidiaDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (m *NvidiaDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (m *NvidiaDevicePlugin) Register(kubeletEndpoint, resourceName string) error
- func (m *NvidiaDevicePlugin) Serve() error
- func (m *NvidiaDevicePlugin) Start() error
- func (m *NvidiaDevicePlugin) Stop() error
Constants ¶
View Source
const ( OptimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again" EnvResourceIndex = "NVIDIA_COM_GPU_MEM_IDX" EnvResourceByPod = "NVIDIA_COM_GPU_MEM_POD" EnvResourceByContainer = "NVIDIA_COM_GPU_MEM_CONTAINER" EnvResourceByDev = "NVIDIA_COM_GPU_MEM_DEV" EnvAssignedFlag = "NVIDIA_COM_GPU_MEM_ASSIGNED" EnvResourceAssumeTime = "NVIDIA_COM_GPU_MEM_ASSUME_TIME" EnvResourceAssignTime = "NVIDIA_COM_GPU_MEM_ASSIGN_TIME" EnvNodeLabelForDisableCGPU = "cgpu.disable.isolation" GiBPrefix = MemoryUnit("GiB") MiBPrefix = MemoryUnit("MiB") )
Variables ¶
This section is empty.
Functions ¶
func NewSharedGPUManager ¶
func NewSharedGPUManager(enableMPS, healthCheck, queryKubelet bool, bp MemoryUnit, client *client.KubeletClient) *sharedGPUManager
func StackTrace ¶
Types ¶
type NvidiaDevicePlugin ¶
NvidiaDevicePlugin implements the Kubernetes device plugin API
func NewNvidiaDevicePlugin ¶
func NewNvidiaDevicePlugin(mps, healthCheck, queryKubelet bool, client *client.KubeletClient) (*NvidiaDevicePlugin, error)
NewNvidiaDevicePlugin returns an initialized NvidiaDevicePlugin
func (*NvidiaDevicePlugin) Allocate ¶
func (m *NvidiaDevicePlugin) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
Allocate which return list of devices.
func (*NvidiaDevicePlugin) GetDeviceNameByIndex ¶
func (m *NvidiaDevicePlugin) GetDeviceNameByIndex(index uint) (name string, found bool)
func (*NvidiaDevicePlugin) GetDevicePluginOptions ¶
func (m *NvidiaDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
func (*NvidiaDevicePlugin) ListAndWatch ¶
func (m *NvidiaDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status
func (*NvidiaDevicePlugin) PreStartContainer ¶
func (m *NvidiaDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
func (*NvidiaDevicePlugin) Register ¶
func (m *NvidiaDevicePlugin) Register(kubeletEndpoint, resourceName string) error
Register registers the device plugin for the given resourceName with Kubelet.
func (*NvidiaDevicePlugin) Serve ¶
func (m *NvidiaDevicePlugin) Serve() error
Serve starts the gRPC server and register the device plugin to Kubelet
func (*NvidiaDevicePlugin) Start ¶
func (m *NvidiaDevicePlugin) Start() error
Start starts the gRPC server of the device plugin
func (*NvidiaDevicePlugin) Stop ¶
func (m *NvidiaDevicePlugin) Stop() error
Stop stops the gRPC server
Click to show internal directories.
Click to hide internal directories.