v1beta1

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 251

Documentation

Index

Constants

View Source
const (
	DevicePlugin_GetDevicePluginOptions_FullMethodName = "/v1beta1.DevicePlugin/GetDevicePluginOptions"
	DevicePlugin_ListAndWatch_FullMethodName           = "/v1beta1.DevicePlugin/ListAndWatch"
	DevicePlugin_GetPreferredAllocation_FullMethodName = "/v1beta1.DevicePlugin/GetPreferredAllocation"
	DevicePlugin_Allocate_FullMethodName               = "/v1beta1.DevicePlugin/Allocate"
	DevicePlugin_PreStartContainer_FullMethodName      = "/v1beta1.DevicePlugin/PreStartContainer"
)
View Source
const (
	// Healthy means that the device is healthy
	Healthy = "Healthy"
	// Unhealthy means that the device is unhealthy
	Unhealthy = "Unhealthy"

	// Version means current version of the API supported by kubelet
	Version = "v1beta1"
	// DevicePluginPath is the folder the Device Plugin is expecting sockets to be on
	// Only privileged pods have access to this path
	// Note: Placeholder until we find a "standard path"
	DevicePluginPath = "/var/lib/kubelet/device-plugins/"
	// KubeletSocket is the path of the Kubelet registry socket
	KubeletSocket = DevicePluginPath + "kubelet.sock"

	// DevicePluginPathWindows Avoid failed to run Kubelet: bad socketPath,
	// must be an absolute path: /var/lib/kubelet/device-plugins/kubelet.sock
	// https://github.com/kubernetes/kubernetes/issues/93262
	// https://github.com/kubernetes/kubernetes/pull/93285#discussion_r458140701
	DevicePluginPathWindows = "\\var\\lib\\kubelet\\device-plugins\\"
	// KubeletSocketWindows is the path of the Kubelet registry socket on windows
	KubeletSocketWindows = DevicePluginPathWindows + "kubelet.sock"

	// KubeletPreStartContainerRPCTimeoutInSecs is the timeout duration in secs for PreStartContainer RPC
	// Timeout duration in secs for PreStartContainer RPC
	KubeletPreStartContainerRPCTimeoutInSecs = 30
)
View Source
const (
	Registration_Register_FullMethodName = "/v1beta1.Registration/Register"
)

Variables

View Source
var DevicePlugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1beta1.DevicePlugin",
	HandlerType: (*DevicePluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDevicePluginOptions",
			Handler:    _DevicePlugin_GetDevicePluginOptions_Handler,
		},
		{
			MethodName: "GetPreferredAllocation",
			Handler:    _DevicePlugin_GetPreferredAllocation_Handler,
		},
		{
			MethodName: "Allocate",
			Handler:    _DevicePlugin_Allocate_Handler,
		},
		{
			MethodName: "PreStartContainer",
			Handler:    _DevicePlugin_PreStartContainer_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListAndWatch",
			Handler:       _DevicePlugin_ListAndWatch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto",
}

DevicePlugin_ServiceDesc is the grpc.ServiceDesc for DevicePlugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_staging_src_k8s_io_kubelet_pkg_apis_deviceplugin_v1beta1_api_proto protoreflect.FileDescriptor
View Source
var Registration_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1beta1.Registration",
	HandlerType: (*RegistrationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _Registration_Register_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto",
}

Registration_ServiceDesc is the grpc.ServiceDesc for Registration service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var SupportedVersions = [...]string{"v1beta1"}

SupportedVersions provides a list of supported version

Functions

func RegisterDevicePluginServer

func RegisterDevicePluginServer(s grpc.ServiceRegistrar, srv DevicePluginServer)

func RegisterRegistrationServer

func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer)

Types

type AllocateRequest

type AllocateRequest struct {
	ContainerRequests []*ContainerAllocateRequest `protobuf:"bytes,1,rep,name=container_requests,json=containerRequests,proto3" json:"container_requests,omitempty"`
	// contains filtered or unexported fields
}
  • Allocate is expected to be called during pod creation since allocation failures for any container would result in pod startup failure.
  • Allocate allows kubelet to exposes additional artifacts in a pod's environment as directed by the plugin.
  • Allocate allows Device Plugin to run device specific operations on the Devices requested

func (*AllocateRequest) Descriptor deprecated

func (*AllocateRequest) Descriptor() ([]byte, []int)

Deprecated: Use AllocateRequest.ProtoReflect.Descriptor instead.

func (*AllocateRequest) GetContainerRequests

func (x *AllocateRequest) GetContainerRequests() []*ContainerAllocateRequest

func (*AllocateRequest) ProtoMessage

func (*AllocateRequest) ProtoMessage()

func (*AllocateRequest) ProtoReflect added in v0.34.0

func (x *AllocateRequest) ProtoReflect() protoreflect.Message

func (*AllocateRequest) Reset

func (x *AllocateRequest) Reset()

func (*AllocateRequest) String

func (x *AllocateRequest) String() string

type AllocateResponse

type AllocateResponse struct {
	ContainerResponses []*ContainerAllocateResponse `protobuf:"bytes,1,rep,name=container_responses,json=containerResponses,proto3" json:"container_responses,omitempty"`
	// contains filtered or unexported fields
}

AllocateResponse includes the artifacts that needs to be injected into a container for accessing 'deviceIDs' that were mentioned as part of 'AllocateRequest'. Failure Handling: if Kubelet sends an allocation request for dev1 and dev2. Allocation on dev1 succeeds but allocation on dev2 fails. The Device plugin should send a ListAndWatch update and fail the Allocation request

func (*AllocateResponse) Descriptor deprecated

func (*AllocateResponse) Descriptor() ([]byte, []int)

Deprecated: Use AllocateResponse.ProtoReflect.Descriptor instead.

func (*AllocateResponse) GetContainerResponses

func (x *AllocateResponse) GetContainerResponses() []*ContainerAllocateResponse

func (*AllocateResponse) ProtoMessage

func (*AllocateResponse) ProtoMessage()

func (*AllocateResponse) ProtoReflect added in v0.34.0

func (x *AllocateResponse) ProtoReflect() protoreflect.Message

func (*AllocateResponse) Reset

func (x *AllocateResponse) Reset()

func (*AllocateResponse) String

func (x *AllocateResponse) String() string

type CDIDevice added in v0.28.0

type CDIDevice struct {

	// Fully qualified CDI device name
	// for example: vendor.com/gpu=gpudevice1
	// see more details in the CDI specification:
	// https://github.com/container-orchestrated-devices/container-device-interface/blob/main/SPEC.md
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

CDIDevice specifies a CDI device information.

func (*CDIDevice) Descriptor deprecated added in v0.28.0

func (*CDIDevice) Descriptor() ([]byte, []int)

Deprecated: Use CDIDevice.ProtoReflect.Descriptor instead.

func (*CDIDevice) GetName added in v0.28.0

func (x *CDIDevice) GetName() string

func (*CDIDevice) ProtoMessage added in v0.28.0

func (*CDIDevice) ProtoMessage()

func (*CDIDevice) ProtoReflect added in v0.34.0

func (x *CDIDevice) ProtoReflect() protoreflect.Message

func (*CDIDevice) Reset added in v0.28.0

func (x *CDIDevice) Reset()

func (*CDIDevice) String added in v0.28.0

func (x *CDIDevice) String() string

type ContainerAllocateRequest

type ContainerAllocateRequest struct {
	DevicesIds []string `protobuf:"bytes,1,rep,name=devices_ids,json=devicesIds,proto3" json:"devices_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*ContainerAllocateRequest) Descriptor deprecated

func (*ContainerAllocateRequest) Descriptor() ([]byte, []int)

Deprecated: Use ContainerAllocateRequest.ProtoReflect.Descriptor instead.

func (*ContainerAllocateRequest) GetDevicesIds added in v0.34.0

func (x *ContainerAllocateRequest) GetDevicesIds() []string

func (*ContainerAllocateRequest) ProtoMessage

func (*ContainerAllocateRequest) ProtoMessage()

func (*ContainerAllocateRequest) ProtoReflect added in v0.34.0

func (x *ContainerAllocateRequest) ProtoReflect() protoreflect.Message

func (*ContainerAllocateRequest) Reset

func (x *ContainerAllocateRequest) Reset()

func (*ContainerAllocateRequest) String

func (x *ContainerAllocateRequest) String() string

type ContainerAllocateResponse

type ContainerAllocateResponse struct {

	// List of environment variable to be set in the container to access one of more devices.
	Envs map[string]string `` /* 135-byte string literal not displayed */
	// Mounts for the container.
	Mounts []*Mount `protobuf:"bytes,2,rep,name=mounts,proto3" json:"mounts,omitempty"`
	// Devices for the container.
	Devices []*DeviceSpec `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices,omitempty"`
	// Container annotations to pass to the container runtime
	Annotations map[string]string `` /* 149-byte string literal not displayed */
	// CDI devices for the container.
	CdiDevices []*CDIDevice `protobuf:"bytes,5,rep,name=cdi_devices,json=cdiDevices,proto3" json:"cdi_devices,omitempty"`
	// contains filtered or unexported fields
}

func (*ContainerAllocateResponse) Descriptor deprecated

func (*ContainerAllocateResponse) Descriptor() ([]byte, []int)

Deprecated: Use ContainerAllocateResponse.ProtoReflect.Descriptor instead.

func (*ContainerAllocateResponse) GetAnnotations

func (x *ContainerAllocateResponse) GetAnnotations() map[string]string

func (*ContainerAllocateResponse) GetCdiDevices added in v0.34.0

func (x *ContainerAllocateResponse) GetCdiDevices() []*CDIDevice

func (*ContainerAllocateResponse) GetDevices

func (x *ContainerAllocateResponse) GetDevices() []*DeviceSpec

func (*ContainerAllocateResponse) GetEnvs

func (x *ContainerAllocateResponse) GetEnvs() map[string]string

func (*ContainerAllocateResponse) GetMounts

func (x *ContainerAllocateResponse) GetMounts() []*Mount

func (*ContainerAllocateResponse) ProtoMessage

func (*ContainerAllocateResponse) ProtoMessage()

func (*ContainerAllocateResponse) ProtoReflect added in v0.34.0

func (*ContainerAllocateResponse) Reset

func (x *ContainerAllocateResponse) Reset()

func (*ContainerAllocateResponse) String

func (x *ContainerAllocateResponse) String() string

type ContainerPreferredAllocationRequest added in v0.19.0

type ContainerPreferredAllocationRequest struct {

	// List of available deviceIDs from which to choose a preferred allocation
	AvailableDeviceIDs []string `protobuf:"bytes,1,rep,name=available_deviceIDs,json=availableDeviceIDs,proto3" json:"available_deviceIDs,omitempty"`
	// List of deviceIDs that must be included in the preferred allocation
	MustIncludeDeviceIDs []string `protobuf:"bytes,2,rep,name=must_include_deviceIDs,json=mustIncludeDeviceIDs,proto3" json:"must_include_deviceIDs,omitempty"`
	// Number of devices to include in the preferred allocation
	AllocationSize int32 `protobuf:"varint,3,opt,name=allocation_size,json=allocationSize,proto3" json:"allocation_size,omitempty"`
	// contains filtered or unexported fields
}

func (*ContainerPreferredAllocationRequest) Descriptor deprecated added in v0.19.0

func (*ContainerPreferredAllocationRequest) Descriptor() ([]byte, []int)

Deprecated: Use ContainerPreferredAllocationRequest.ProtoReflect.Descriptor instead.

func (*ContainerPreferredAllocationRequest) GetAllocationSize added in v0.19.0

func (x *ContainerPreferredAllocationRequest) GetAllocationSize() int32

func (*ContainerPreferredAllocationRequest) GetAvailableDeviceIDs added in v0.19.0

func (x *ContainerPreferredAllocationRequest) GetAvailableDeviceIDs() []string

func (*ContainerPreferredAllocationRequest) GetMustIncludeDeviceIDs added in v0.19.0

func (x *ContainerPreferredAllocationRequest) GetMustIncludeDeviceIDs() []string

func (*ContainerPreferredAllocationRequest) ProtoMessage added in v0.19.0

func (*ContainerPreferredAllocationRequest) ProtoMessage()

func (*ContainerPreferredAllocationRequest) ProtoReflect added in v0.34.0

func (*ContainerPreferredAllocationRequest) Reset added in v0.19.0

func (*ContainerPreferredAllocationRequest) String added in v0.19.0

type ContainerPreferredAllocationResponse added in v0.19.0

type ContainerPreferredAllocationResponse struct {
	DeviceIDs []string `protobuf:"bytes,1,rep,name=deviceIDs,proto3" json:"deviceIDs,omitempty"`
	// contains filtered or unexported fields
}

func (*ContainerPreferredAllocationResponse) Descriptor deprecated added in v0.19.0

func (*ContainerPreferredAllocationResponse) Descriptor() ([]byte, []int)

Deprecated: Use ContainerPreferredAllocationResponse.ProtoReflect.Descriptor instead.

func (*ContainerPreferredAllocationResponse) GetDeviceIDs added in v0.19.0

func (x *ContainerPreferredAllocationResponse) GetDeviceIDs() []string

func (*ContainerPreferredAllocationResponse) ProtoMessage added in v0.19.0

func (*ContainerPreferredAllocationResponse) ProtoMessage()

func (*ContainerPreferredAllocationResponse) ProtoReflect added in v0.34.0

func (*ContainerPreferredAllocationResponse) Reset added in v0.19.0

func (*ContainerPreferredAllocationResponse) String added in v0.19.0

type Device

type Device struct {

	// A unique ID assigned by the device plugin used
	// to identify devices during the communication
	// Max length of this field is 63 characters
	ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// Health of the device, can be healthy or unhealthy, see constants.go
	Health string `protobuf:"bytes,2,opt,name=health,proto3" json:"health,omitempty"`
	// Topology for device
	Topology *TopologyInfo `protobuf:"bytes,3,opt,name=topology,proto3" json:"topology,omitempty"`
	// contains filtered or unexported fields
}

E.g:

struct Device {
   ID: "GPU-fef8089b-4820-abfc-e83e-94318197576e",
   Health: "Healthy",
   Topology:
     Node:
       ID: 1
}

func (*Device) Descriptor deprecated

func (*Device) Descriptor() ([]byte, []int)

Deprecated: Use Device.ProtoReflect.Descriptor instead.

func (*Device) GetHealth

func (x *Device) GetHealth() string

func (*Device) GetID

func (x *Device) GetID() string

func (*Device) GetTopology

func (x *Device) GetTopology() *TopologyInfo

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) ProtoReflect added in v0.34.0

func (x *Device) ProtoReflect() protoreflect.Message

func (*Device) Reset

func (x *Device) Reset()

func (*Device) String

func (x *Device) String() string

type DevicePluginClient

type DevicePluginClient interface {
	// GetDevicePluginOptions returns options to be communicated with Device
	// Manager
	GetDevicePluginOptions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DevicePluginOptions, error)
	// ListAndWatch returns a stream of List of Devices
	// Whenever a Device state change or a Device disappears, ListAndWatch
	// returns the new list
	ListAndWatch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListAndWatchResponse], error)
	// GetPreferredAllocation returns a preferred set of devices to allocate
	// from a list of available ones. The resulting preferred allocation is not
	// guaranteed to be the allocation ultimately performed by the
	// devicemanager. It is only designed to help the devicemanager make a more
	// informed allocation decision when possible.
	GetPreferredAllocation(ctx context.Context, in *PreferredAllocationRequest, opts ...grpc.CallOption) (*PreferredAllocationResponse, error)
	// Allocate is called during container creation so that the Device
	// Plugin can run device specific operations and instruct Kubelet
	// of the steps to make the Device available in the container
	Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error)
	// PreStartContainer is called, if indicated by Device Plugin during registeration phase,
	// before each container start. Device plugin can run device specific operations
	// such as resetting the device before making devices available to the container
	PreStartContainer(ctx context.Context, in *PreStartContainerRequest, opts ...grpc.CallOption) (*PreStartContainerResponse, error)
}

DevicePluginClient is the client API for DevicePlugin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

DevicePlugin is the service advertised by Device Plugins

type DevicePluginOptions

type DevicePluginOptions struct {

	// Indicates if PreStartContainer call is required before each container start
	PreStartRequired bool `protobuf:"varint,1,opt,name=pre_start_required,json=preStartRequired,proto3" json:"pre_start_required,omitempty"`
	// Indicates if GetPreferredAllocation is implemented and available for calling
	GetPreferredAllocationAvailable bool `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*DevicePluginOptions) Descriptor deprecated

func (*DevicePluginOptions) Descriptor() ([]byte, []int)

Deprecated: Use DevicePluginOptions.ProtoReflect.Descriptor instead.

func (*DevicePluginOptions) GetGetPreferredAllocationAvailable added in v0.19.0

func (x *DevicePluginOptions) GetGetPreferredAllocationAvailable() bool

func (*DevicePluginOptions) GetPreStartRequired

func (x *DevicePluginOptions) GetPreStartRequired() bool

func (*DevicePluginOptions) ProtoMessage

func (*DevicePluginOptions) ProtoMessage()

func (*DevicePluginOptions) ProtoReflect added in v0.34.0

func (x *DevicePluginOptions) ProtoReflect() protoreflect.Message

func (*DevicePluginOptions) Reset

func (x *DevicePluginOptions) Reset()

func (*DevicePluginOptions) String

func (x *DevicePluginOptions) String() string

type DevicePluginServer

type DevicePluginServer interface {
	// GetDevicePluginOptions returns options to be communicated with Device
	// Manager
	GetDevicePluginOptions(context.Context, *Empty) (*DevicePluginOptions, error)
	// ListAndWatch returns a stream of List of Devices
	// Whenever a Device state change or a Device disappears, ListAndWatch
	// returns the new list
	ListAndWatch(*Empty, grpc.ServerStreamingServer[ListAndWatchResponse]) error
	// GetPreferredAllocation returns a preferred set of devices to allocate
	// from a list of available ones. The resulting preferred allocation is not
	// guaranteed to be the allocation ultimately performed by the
	// devicemanager. It is only designed to help the devicemanager make a more
	// informed allocation decision when possible.
	GetPreferredAllocation(context.Context, *PreferredAllocationRequest) (*PreferredAllocationResponse, error)
	// Allocate is called during container creation so that the Device
	// Plugin can run device specific operations and instruct Kubelet
	// of the steps to make the Device available in the container
	Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error)
	// PreStartContainer is called, if indicated by Device Plugin during registeration phase,
	// before each container start. Device plugin can run device specific operations
	// such as resetting the device before making devices available to the container
	PreStartContainer(context.Context, *PreStartContainerRequest) (*PreStartContainerResponse, error)
	// contains filtered or unexported methods
}

DevicePluginServer is the server API for DevicePlugin service. All implementations must embed UnimplementedDevicePluginServer for forward compatibility.

DevicePlugin is the service advertised by Device Plugins

type DevicePlugin_ListAndWatchClient

type DevicePlugin_ListAndWatchClient = grpc.ServerStreamingClient[ListAndWatchResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type DevicePlugin_ListAndWatchServer

type DevicePlugin_ListAndWatchServer = grpc.ServerStreamingServer[ListAndWatchResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type DeviceSpec

type DeviceSpec struct {

	// Path of the device within the container.
	ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"`
	// Path of the device on the host.
	HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"`
	// Cgroups permissions of the device, candidates are one or more of
	// * r - allows container to read from the specified device.
	// * w - allows container to write to the specified device.
	// * m - allows container to create device files that do not yet exist.
	Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"`
	// contains filtered or unexported fields
}

DeviceSpec specifies a host device to mount into a container.

func (*DeviceSpec) Descriptor deprecated

func (*DeviceSpec) Descriptor() ([]byte, []int)

Deprecated: Use DeviceSpec.ProtoReflect.Descriptor instead.

func (*DeviceSpec) GetContainerPath

func (x *DeviceSpec) GetContainerPath() string

func (*DeviceSpec) GetHostPath

func (x *DeviceSpec) GetHostPath() string

func (*DeviceSpec) GetPermissions

func (x *DeviceSpec) GetPermissions() string

func (*DeviceSpec) ProtoMessage

func (*DeviceSpec) ProtoMessage()

func (*DeviceSpec) ProtoReflect added in v0.34.0

func (x *DeviceSpec) ProtoReflect() protoreflect.Message

func (*DeviceSpec) Reset

func (x *DeviceSpec) Reset()

func (*DeviceSpec) String

func (x *DeviceSpec) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v0.34.0

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type ListAndWatchResponse

type ListAndWatchResponse struct {
	Devices []*Device `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
	// contains filtered or unexported fields
}

ListAndWatch returns a stream of List of Devices Whenever a Device state change or a Device disappears, ListAndWatch returns the new list

func (*ListAndWatchResponse) Descriptor deprecated

func (*ListAndWatchResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListAndWatchResponse.ProtoReflect.Descriptor instead.

func (*ListAndWatchResponse) GetDevices

func (x *ListAndWatchResponse) GetDevices() []*Device

func (*ListAndWatchResponse) ProtoMessage

func (*ListAndWatchResponse) ProtoMessage()

func (*ListAndWatchResponse) ProtoReflect added in v0.34.0

func (x *ListAndWatchResponse) ProtoReflect() protoreflect.Message

func (*ListAndWatchResponse) Reset

func (x *ListAndWatchResponse) Reset()

func (*ListAndWatchResponse) String

func (x *ListAndWatchResponse) String() string

type Mount

type Mount struct {

	// Path of the mount within the container.
	ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"`
	// Path of the mount on the host.
	HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"`
	// If set, the mount is read-only.
	ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
	// contains filtered or unexported fields
}

Mount specifies a host volume to mount into a container. where device library or tools are installed on host and container

func (*Mount) Descriptor deprecated

func (*Mount) Descriptor() ([]byte, []int)

Deprecated: Use Mount.ProtoReflect.Descriptor instead.

func (*Mount) GetContainerPath

func (x *Mount) GetContainerPath() string

func (*Mount) GetHostPath

func (x *Mount) GetHostPath() string

func (*Mount) GetReadOnly

func (x *Mount) GetReadOnly() bool

func (*Mount) ProtoMessage

func (*Mount) ProtoMessage()

func (*Mount) ProtoReflect added in v0.34.0

func (x *Mount) ProtoReflect() protoreflect.Message

func (*Mount) Reset

func (x *Mount) Reset()

func (*Mount) String

func (x *Mount) String() string

type NUMANode

type NUMANode struct {
	ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// contains filtered or unexported fields
}

func (*NUMANode) Descriptor deprecated

func (*NUMANode) Descriptor() ([]byte, []int)

Deprecated: Use NUMANode.ProtoReflect.Descriptor instead.

func (*NUMANode) GetID

func (x *NUMANode) GetID() int64

func (*NUMANode) ProtoMessage

func (*NUMANode) ProtoMessage()

func (*NUMANode) ProtoReflect added in v0.34.0

func (x *NUMANode) ProtoReflect() protoreflect.Message

func (*NUMANode) Reset

func (x *NUMANode) Reset()

func (*NUMANode) String

func (x *NUMANode) String() string

type PreStartContainerRequest

type PreStartContainerRequest struct {
	DevicesIds []string `protobuf:"bytes,1,rep,name=devices_ids,json=devicesIds,proto3" json:"devices_ids,omitempty"`
	// contains filtered or unexported fields
}
  • PreStartContainer is expected to be called before each container start if indicated by plugin during registration phase.
  • PreStartContainer allows kubelet to pass reinitialized devices to containers.
  • PreStartContainer allows Device Plugin to run device specific operations on the Devices requested

func (*PreStartContainerRequest) Descriptor deprecated

func (*PreStartContainerRequest) Descriptor() ([]byte, []int)

Deprecated: Use PreStartContainerRequest.ProtoReflect.Descriptor instead.

func (*PreStartContainerRequest) GetDevicesIds added in v0.34.0

func (x *PreStartContainerRequest) GetDevicesIds() []string

func (*PreStartContainerRequest) ProtoMessage

func (*PreStartContainerRequest) ProtoMessage()

func (*PreStartContainerRequest) ProtoReflect added in v0.34.0

func (x *PreStartContainerRequest) ProtoReflect() protoreflect.Message

func (*PreStartContainerRequest) Reset

func (x *PreStartContainerRequest) Reset()

func (*PreStartContainerRequest) String

func (x *PreStartContainerRequest) String() string

type PreStartContainerResponse

type PreStartContainerResponse struct {
	// contains filtered or unexported fields
}

PreStartContainerResponse will be send by plugin in response to PreStartContainerRequest

func (*PreStartContainerResponse) Descriptor deprecated

func (*PreStartContainerResponse) Descriptor() ([]byte, []int)

Deprecated: Use PreStartContainerResponse.ProtoReflect.Descriptor instead.

func (*PreStartContainerResponse) ProtoMessage

func (*PreStartContainerResponse) ProtoMessage()

func (*PreStartContainerResponse) ProtoReflect added in v0.34.0

func (*PreStartContainerResponse) Reset

func (x *PreStartContainerResponse) Reset()

func (*PreStartContainerResponse) String

func (x *PreStartContainerResponse) String() string

type PreferredAllocationRequest added in v0.19.0

type PreferredAllocationRequest struct {
	ContainerRequests []*ContainerPreferredAllocationRequest `protobuf:"bytes,1,rep,name=container_requests,json=containerRequests,proto3" json:"container_requests,omitempty"`
	// contains filtered or unexported fields
}

PreferredAllocationRequest is passed via a call to GetPreferredAllocation() at pod admission time. The device plugin should take the list of `available_deviceIDs` and calculate a preferred allocation of size 'allocation_size' from them, making sure to include the set of devices listed in 'must_include_deviceIDs'.

func (*PreferredAllocationRequest) Descriptor deprecated added in v0.19.0

func (*PreferredAllocationRequest) Descriptor() ([]byte, []int)

Deprecated: Use PreferredAllocationRequest.ProtoReflect.Descriptor instead.

func (*PreferredAllocationRequest) GetContainerRequests added in v0.19.0

func (*PreferredAllocationRequest) ProtoMessage added in v0.19.0

func (*PreferredAllocationRequest) ProtoMessage()

func (*PreferredAllocationRequest) ProtoReflect added in v0.34.0

func (*PreferredAllocationRequest) Reset added in v0.19.0

func (x *PreferredAllocationRequest) Reset()

func (*PreferredAllocationRequest) String added in v0.19.0

func (x *PreferredAllocationRequest) String() string

type PreferredAllocationResponse added in v0.19.0

type PreferredAllocationResponse struct {
	ContainerResponses []*ContainerPreferredAllocationResponse `protobuf:"bytes,1,rep,name=container_responses,json=containerResponses,proto3" json:"container_responses,omitempty"`
	// contains filtered or unexported fields
}

PreferredAllocationResponse returns a preferred allocation, resulting from a PreferredAllocationRequest.

func (*PreferredAllocationResponse) Descriptor deprecated added in v0.19.0

func (*PreferredAllocationResponse) Descriptor() ([]byte, []int)

Deprecated: Use PreferredAllocationResponse.ProtoReflect.Descriptor instead.

func (*PreferredAllocationResponse) GetContainerResponses added in v0.19.0

func (*PreferredAllocationResponse) ProtoMessage added in v0.19.0

func (*PreferredAllocationResponse) ProtoMessage()

func (*PreferredAllocationResponse) ProtoReflect added in v0.34.0

func (*PreferredAllocationResponse) Reset added in v0.19.0

func (x *PreferredAllocationResponse) Reset()

func (*PreferredAllocationResponse) String added in v0.19.0

func (x *PreferredAllocationResponse) String() string

type RegisterRequest

type RegisterRequest struct {

	// Version of the API the Device Plugin was built against
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// Name of the unix socket the device plugin is listening on
	// PATH = path.Join(DevicePluginPath, endpoint)
	Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// Schedulable resource name. As of now it's expected to be a DNS Label
	ResourceName string `protobuf:"bytes,3,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
	// Options to be communicated with Device Manager
	Options *DevicePluginOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

func (*RegisterRequest) Descriptor() ([]byte, []int)

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetEndpoint

func (x *RegisterRequest) GetEndpoint() string

func (*RegisterRequest) GetOptions

func (x *RegisterRequest) GetOptions() *DevicePluginOptions

func (*RegisterRequest) GetResourceName

func (x *RegisterRequest) GetResourceName() string

func (*RegisterRequest) GetVersion

func (x *RegisterRequest) GetVersion() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect added in v0.34.0

func (x *RegisterRequest) ProtoReflect() protoreflect.Message

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegistrationClient

type RegistrationClient interface {
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*Empty, error)
}

RegistrationClient is the client API for Registration service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Registration is the service advertised by the Kubelet Only when Kubelet answers with a success code to a Register Request may Device Plugins start their service Registration may fail when device plugin version is not supported by Kubelet or the registered resourceName is already taken by another active device plugin. Device plugin is expected to terminate upon registration failure

type RegistrationServer

type RegistrationServer interface {
	Register(context.Context, *RegisterRequest) (*Empty, error)
	// contains filtered or unexported methods
}

RegistrationServer is the server API for Registration service. All implementations must embed UnimplementedRegistrationServer for forward compatibility.

Registration is the service advertised by the Kubelet Only when Kubelet answers with a success code to a Register Request may Device Plugins start their service Registration may fail when device plugin version is not supported by Kubelet or the registered resourceName is already taken by another active device plugin. Device plugin is expected to terminate upon registration failure

type TopologyInfo

type TopologyInfo struct {
	Nodes []*NUMANode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*TopologyInfo) Descriptor deprecated

func (*TopologyInfo) Descriptor() ([]byte, []int)

Deprecated: Use TopologyInfo.ProtoReflect.Descriptor instead.

func (*TopologyInfo) GetNodes

func (x *TopologyInfo) GetNodes() []*NUMANode

func (*TopologyInfo) ProtoMessage

func (*TopologyInfo) ProtoMessage()

func (*TopologyInfo) ProtoReflect added in v0.34.0

func (x *TopologyInfo) ProtoReflect() protoreflect.Message

func (*TopologyInfo) Reset

func (x *TopologyInfo) Reset()

func (*TopologyInfo) String

func (x *TopologyInfo) String() string

type UnimplementedDevicePluginServer

type UnimplementedDevicePluginServer struct{}

UnimplementedDevicePluginServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedDevicePluginServer) Allocate

func (UnimplementedDevicePluginServer) GetDevicePluginOptions

func (UnimplementedDevicePluginServer) GetPreferredAllocation added in v0.19.0

func (UnimplementedDevicePluginServer) ListAndWatch

func (UnimplementedDevicePluginServer) PreStartContainer

type UnimplementedRegistrationServer

type UnimplementedRegistrationServer struct{}

UnimplementedRegistrationServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedRegistrationServer) Register

type UnsafeDevicePluginServer added in v0.34.0

type UnsafeDevicePluginServer interface {
	// contains filtered or unexported methods
}

UnsafeDevicePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DevicePluginServer will result in compilation errors.

type UnsafeRegistrationServer added in v0.34.0

type UnsafeRegistrationServer interface {
	// contains filtered or unexported methods
}

UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RegistrationServer will result in compilation errors.

Jump to

Keyboard shortcuts

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