Documentation
¶
Index ¶
- Constants
- type Interface
- type NvidiaDevicePlugin
- func (plugin *NvidiaDevicePlugin) Allocate(ctx context.Context, reqs *kubeletdevicepluginv1beta1.AllocateRequest) (*kubeletdevicepluginv1beta1.AllocateResponse, error)
- func (plugin *NvidiaDevicePlugin) Devices() rm.Devices
- func (plugin *NvidiaDevicePlugin) GetDevicePluginOptions(context.Context, *kubeletdevicepluginv1beta1.Empty) (*kubeletdevicepluginv1beta1.DevicePluginOptions, error)
- func (plugin *NvidiaDevicePlugin) GetPreferredAllocation(ctx context.Context, r *kubeletdevicepluginv1beta1.PreferredAllocationRequest) (*kubeletdevicepluginv1beta1.PreferredAllocationResponse, error)
- func (plugin *NvidiaDevicePlugin) ListAndWatch(e *kubeletdevicepluginv1beta1.Empty, ...) error
- func (plugin *NvidiaDevicePlugin) PreStartContainer(context.Context, *kubeletdevicepluginv1beta1.PreStartContainerRequest) (*kubeletdevicepluginv1beta1.PreStartContainerResponse, error)
- func (plugin *NvidiaDevicePlugin) Register() error
- func (plugin *NvidiaDevicePlugin) RegistrInAnnotation() error
- func (plugin *NvidiaDevicePlugin) Serve() error
- func (plugin *NvidiaDevicePlugin) Start() error
- func (plugin *NvidiaDevicePlugin) Stop() error
- func (plugin *NvidiaDevicePlugin) WatchAndRegister()
Constants ¶
const (
NodeLockNvidia = "hami.io/mutex.lock"
)
Constants for use by the 'volume-mounts' device list strategy
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NvidiaDevicePlugin ¶
type NvidiaDevicePlugin struct {
// contains filtered or unexported fields
}
NvidiaDevicePlugin implements the Kubernetes device plugin API
func NewNvidiaDevicePlugin ¶
func NewNvidiaDevicePlugin(config *util.DeviceConfig, resourceManager rm.ResourceManager, cdiHandler cdi.Interface, cdiEnabled bool) *NvidiaDevicePlugin
NewNvidiaDevicePlugin returns an initialized NvidiaDevicePlugin
func (*NvidiaDevicePlugin) Allocate ¶
func (plugin *NvidiaDevicePlugin) Allocate(ctx context.Context, reqs *kubeletdevicepluginv1beta1.AllocateRequest) (*kubeletdevicepluginv1beta1.AllocateResponse, error)
Allocate which return list of devices.
func (*NvidiaDevicePlugin) Devices ¶
func (plugin *NvidiaDevicePlugin) Devices() rm.Devices
Devices returns the full set of devices associated with the plugin.
func (*NvidiaDevicePlugin) GetDevicePluginOptions ¶
func (plugin *NvidiaDevicePlugin) GetDevicePluginOptions(context.Context, *kubeletdevicepluginv1beta1.Empty) (*kubeletdevicepluginv1beta1.DevicePluginOptions, error)
GetDevicePluginOptions returns the values of the optional settings for this plugin
func (*NvidiaDevicePlugin) GetPreferredAllocation ¶
func (plugin *NvidiaDevicePlugin) GetPreferredAllocation(ctx context.Context, r *kubeletdevicepluginv1beta1.PreferredAllocationRequest) (*kubeletdevicepluginv1beta1.PreferredAllocationResponse, error)
GetPreferredAllocation returns the preferred allocation from the set of devices specified in the request
func (*NvidiaDevicePlugin) ListAndWatch ¶
func (plugin *NvidiaDevicePlugin) ListAndWatch(e *kubeletdevicepluginv1beta1.Empty, s kubeletdevicepluginv1beta1.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status
func (*NvidiaDevicePlugin) PreStartContainer ¶
func (plugin *NvidiaDevicePlugin) PreStartContainer(context.Context, *kubeletdevicepluginv1beta1.PreStartContainerRequest) (*kubeletdevicepluginv1beta1.PreStartContainerResponse, error)
PreStartContainer is unimplemented for this plugin
func (*NvidiaDevicePlugin) Register ¶
func (plugin *NvidiaDevicePlugin) Register() error
Register registers the device plugin for the given resourceName with Kubelet.
func (*NvidiaDevicePlugin) RegistrInAnnotation ¶
func (plugin *NvidiaDevicePlugin) RegistrInAnnotation() error
func (*NvidiaDevicePlugin) Serve ¶
func (plugin *NvidiaDevicePlugin) Serve() error
Serve starts the gRPC server of the device plugin.
func (*NvidiaDevicePlugin) Start ¶
func (plugin *NvidiaDevicePlugin) Start() error
Start starts the gRPC server, registers the device plugin with the Kubelet, and starts the device healthchecks.
func (*NvidiaDevicePlugin) Stop ¶
func (plugin *NvidiaDevicePlugin) Stop() error
Stop stops the gRPC server.
func (*NvidiaDevicePlugin) WatchAndRegister ¶
func (plugin *NvidiaDevicePlugin) WatchAndRegister()