Documentation
¶
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AllocatableGpu
- type AllocatedGpu
- type AllocatedGpus
- type DeviceClassParameters
- type DeviceClassParametersList
- type DeviceClassParametersSpec
- type DeviceSelector
- type GpuAllocationState
- type GpuAllocationStateList
- type GpuAllocationStateSpec
- type GpuClaimParameters
- type GpuClaimParametersList
- type GpuClaimParametersSpec
- type GpuType
- type ResourceClaimAllocation
- type ResourceClaimAllocations
Constants ¶
const ( GpuDeviceType = "gpu" VfDeviceType = "vf" AnyDeviceType = "any" UnknownDeviceType = "unknown" )
Types of Devices that can be allocated.
const ( APIGroupName string = "gpu.dra.intel.com" APIVersion string = "v1alpha" )
Variables ¶
var ( // SchemeBuilder initializes a scheme builder. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{ Group: APIGroupName, Version: APIVersion, }
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Types ¶
type AllocatableGpu ¶
type AllocatableGpu struct {
// Unique identifier of device: PCI address and PCI Device ID.
UID string `json:"uid"`
// Amount of local memory in MiB.
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=1048576
Memory int `json:"memory"`
// pci-id of the Gpu device.
Model string `json:"model"`
// Type of the device: bare-metal Gpu or SR-IOV Virtual Function (VF).
Type GpuType `json:"type"` // gpu, vf
// Device where VF should be / is provisioned.
ParentUID string `json:"parentuid"`
// Greater than 0 if SR-IOV is supported / enabled.
Maxvfs int `json:"maxvfs"`
}
AllocatableGpu represents an allocatable Gpu on a node.
func (*AllocatableGpu) DeepCopy ¶
func (in *AllocatableGpu) DeepCopy() *AllocatableGpu
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatableGpu.
func (*AllocatableGpu) DeepCopyInto ¶
func (in *AllocatableGpu) DeepCopyInto(out *AllocatableGpu)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AllocatedGpu ¶
type AllocatedGpu struct {
// Unique identifier of device: PCI address and PCI Device ID.
UID string `json:"uid"`
// Amount of local memory in MiB.
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=1048576
Memory int `json:"memory"`
// Type of the device: bare-metal Gpu or SR-IOV Virtual Function (VF).
Type GpuType `json:"type"` // gpu, vf
// Device where VF should be / is provisioned.
ParentUID string `json:"parentuid"`
// Virtual Function profile defines amount of local memory and time slice VF gets.
Profile string `json:"profile"`
}
AllocatedGpu represents an allocated Gpu on a node.
func (*AllocatedGpu) DeepCopy ¶
func (in *AllocatedGpu) DeepCopy() *AllocatedGpu
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedGpu.
func (*AllocatedGpu) DeepCopyInto ¶
func (in *AllocatedGpu) DeepCopyInto(out *AllocatedGpu)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AllocatedGpus ¶
type AllocatedGpus []AllocatedGpu
AllocatedDevices represents a list of allocated devices on a node. +kubebuilder:validation:MaxItems=8
func (AllocatedGpus) DeepCopy ¶
func (in AllocatedGpus) DeepCopy() AllocatedGpus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedGpus.
func (AllocatedGpus) DeepCopyInto ¶
func (in AllocatedGpus) DeepCopyInto(out *AllocatedGpus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceClassParameters ¶
type DeviceClassParameters struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DeviceClassParametersSpec `json:"spec,omitempty"`
}
DeviceClassParameters holds the set of parameters provided when creating a resource class for this driver.
func (*DeviceClassParameters) DeepCopy ¶
func (in *DeviceClassParameters) DeepCopy() *DeviceClassParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassParameters.
func (*DeviceClassParameters) DeepCopyInto ¶
func (in *DeviceClassParameters) DeepCopyInto(out *DeviceClassParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeviceClassParameters) DeepCopyObject ¶
func (in *DeviceClassParameters) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeviceClassParametersList ¶
type DeviceClassParametersList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DeviceClassParameters `json:"items"`
}
DeviceClassParametersList represents the "plural" of a DeviceClassParameters CRD object.
func (*DeviceClassParametersList) DeepCopy ¶
func (in *DeviceClassParametersList) DeepCopy() *DeviceClassParametersList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassParametersList.
func (*DeviceClassParametersList) DeepCopyInto ¶
func (in *DeviceClassParametersList) DeepCopyInto(out *DeviceClassParametersList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeviceClassParametersList) DeepCopyObject ¶
func (in *DeviceClassParametersList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeviceClassParametersSpec ¶
type DeviceClassParametersSpec struct {
DeviceSelector []DeviceSelector `json:"deviceSelector,omitempty"`
}
DeviceClassParametersSpec is the spec for the DeviceClassParametersSpec CRD.
func (*DeviceClassParametersSpec) DeepCopy ¶
func (in *DeviceClassParametersSpec) DeepCopy() *DeviceClassParametersSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassParametersSpec.
func (*DeviceClassParametersSpec) DeepCopyInto ¶
func (in *DeviceClassParametersSpec) DeepCopyInto(out *DeviceClassParametersSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceSelector ¶
DeviceSelector allows one to match on a specific type of Device as part of the class.
func (*DeviceSelector) DeepCopy ¶
func (in *DeviceSelector) DeepCopy() *DeviceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSelector.
func (*DeviceSelector) DeepCopyInto ¶
func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GpuAllocationState ¶
type GpuAllocationState struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec GpuAllocationStateSpec `json:"spec,omitempty"`
Status string `json:"status,omitempty"`
}
GpuAllocationState holds the state required for allocation on a node.
func (*GpuAllocationState) DeepCopy ¶
func (in *GpuAllocationState) DeepCopy() *GpuAllocationState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GpuAllocationState.
func (*GpuAllocationState) DeepCopyInto ¶
func (in *GpuAllocationState) DeepCopyInto(out *GpuAllocationState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GpuAllocationState) DeepCopyObject ¶
func (in *GpuAllocationState) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GpuAllocationStateList ¶
type GpuAllocationStateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []GpuAllocationState `json:"items"`
}
GpuAllocationStateList represents the "plural" of a GpuAllocationState CRD object.
func (*GpuAllocationStateList) DeepCopy ¶
func (in *GpuAllocationStateList) DeepCopy() *GpuAllocationStateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GpuAllocationStateList.
func (*GpuAllocationStateList) DeepCopyInto ¶
func (in *GpuAllocationStateList) DeepCopyInto(out *GpuAllocationStateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GpuAllocationStateList) DeepCopyObject ¶
func (in *GpuAllocationStateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GpuAllocationStateSpec ¶
type GpuAllocationStateSpec struct {
Allocatable map[string]AllocatableGpu `json:"allocatable,omitempty"`
Prepared map[string]AllocatedGpus `json:"prepared,omitempty"`
ResourceClaimAllocations map[string]ResourceClaimAllocation `json:"resourceClaimAllocations,omitempty"`
}
GpuAllocationStateSpec is the spec for the GpuAllocationState CRD.
func (*GpuAllocationStateSpec) DeepCopy ¶
func (in *GpuAllocationStateSpec) DeepCopy() *GpuAllocationStateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GpuAllocationStateSpec.
func (*GpuAllocationStateSpec) DeepCopyInto ¶
func (in *GpuAllocationStateSpec) DeepCopyInto(out *GpuAllocationStateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GpuClaimParameters ¶
type GpuClaimParameters struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec GpuClaimParametersSpec `json:"spec,omitempty"`
}
GpuClaimParameters holds the set of parameters provided when creating a resource claim for a GPU.
func (*GpuClaimParameters) DeepCopy ¶
func (in *GpuClaimParameters) DeepCopy() *GpuClaimParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GpuClaimParameters.
func (*GpuClaimParameters) DeepCopyInto ¶
func (in *GpuClaimParameters) DeepCopyInto(out *GpuClaimParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GpuClaimParameters) DeepCopyObject ¶
func (in *GpuClaimParameters) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GpuClaimParametersList ¶
type GpuClaimParametersList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []GpuClaimParameters `json:"items"`
}
GpuClaimParametersList represents the "plural" of a GpuClaimParameters CRD object.
func (*GpuClaimParametersList) DeepCopy ¶
func (in *GpuClaimParametersList) DeepCopy() *GpuClaimParametersList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GpuClaimParametersList.
func (*GpuClaimParametersList) DeepCopyInto ¶
func (in *GpuClaimParametersList) DeepCopyInto(out *GpuClaimParametersList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GpuClaimParametersList) DeepCopyObject ¶
func (in *GpuClaimParametersList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GpuClaimParametersSpec ¶
type GpuClaimParametersSpec struct {
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=8
Count int `json:"count"` // quantity of units
// Per GPU memory request, in MiB, maximum 1048576 (1 TiB)
// +kubebuilder:validation:Minimum=8
// +kubebuilder:validation:Maximum=1048576
Memory int `json:"memory,omitempty"`
// +kubebuilder:validation:
Type GpuType `json:"type,omitempty"`
}
GpuClaimParametersSpec is the spec for the GpuClaimParameters CRD.
func (*GpuClaimParametersSpec) DeepCopy ¶
func (in *GpuClaimParametersSpec) DeepCopy() *GpuClaimParametersSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GpuClaimParametersSpec.
func (*GpuClaimParametersSpec) DeepCopyInto ¶
func (in *GpuClaimParametersSpec) DeepCopyInto(out *GpuClaimParametersSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceClaimAllocation ¶
type ResourceClaimAllocation struct {
Gpus AllocatedGpus `json:"gpus"`
// Pod UID, for delayed allocation to match Resource Claims of same Pod when allocating VFs.
Owner string `json:"owner"`
}
RequestedDevices represents a set of request spec and devices requested for allocation.
func (*ResourceClaimAllocation) DeepCopy ¶
func (in *ResourceClaimAllocation) DeepCopy() *ResourceClaimAllocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimAllocation.
func (*ResourceClaimAllocation) DeepCopyInto ¶
func (in *ResourceClaimAllocation) DeepCopyInto(out *ResourceClaimAllocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceClaimAllocations ¶
type ResourceClaimAllocations map[string]ResourceClaimAllocation
func (ResourceClaimAllocations) DeepCopy ¶
func (in ResourceClaimAllocations) DeepCopy() ResourceClaimAllocations
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimAllocations.
func (ResourceClaimAllocations) DeepCopyInto ¶
func (in ResourceClaimAllocations) DeepCopyInto(out *ResourceClaimAllocations)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.