v1alpha1

package
v0.0.0-...-d44f63b Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GPURequirementsKind = "GPURequirements"
	Version             = "v1alpha1"
)
View Source
const (
	// the kubelet plugin determines the allocatable devices on a node
	DeviceAllocationStateAllocatable = "allocatable"

	// the device driver places a temporary hold on a device if the host node
	// is deemed suitable for satisfying a pod's resource claim
	DeviceAllocationStateHold = "hold"

	// the device driver allocates a device to a pod based on the pod's resource
	// claim request
	DeviceAllocationStateAllocated = "allocated"

	// the kubelet plugin prepares an allocated device for use by a pod
	DeviceAllocationStatePrepared = "prepared"
)
View Source
const (
	NodeSuitabilitySuitable   = "suitable"
	NodeSuitabilityUnsuitable = "unsuitable"
	NodeSuitabilityUnknown    = "unknown"
)

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   apis.GroupName,
	Version: Version,
}

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type DeviceAllocation

type DeviceAllocation struct {
	Claim  corev1.TypedLocalObjectReference `json:"claim"`
	Device *GPUDevice                       `json:"devices"`
	State  DeviceAllocationState            `json:"state"`
}

DeviceAllocation represents the allocation state of a GPU device.

func (*DeviceAllocation) DeepCopy

func (in *DeviceAllocation) DeepCopy() *DeviceAllocation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocation.

func (*DeviceAllocation) DeepCopyInto

func (in *DeviceAllocation) DeepCopyInto(out *DeviceAllocation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeviceAllocationState

type DeviceAllocationState string

DeviceAllocationState represents the state of a GPU device. A GPU device can be in one of three states: allocatable, allocated, or prepared.

type DeviceSelector

type DeviceSelector struct {
	Name   string `json:"name"`
	Vendor string `json:"vendor"`
}

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 GPUClassParameters

type GPUClassParameters struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec GPUClassParametersSpec `json:"spec,omitempty"`
}

GPUClassParameters defines pre-start and post-complete hooks fo It can be referenced by a ResourceClass object.

func (*GPUClassParameters) DeepCopy

func (in *GPUClassParameters) DeepCopy() *GPUClassParameters

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUClassParameters.

func (*GPUClassParameters) DeepCopyInto

func (in *GPUClassParameters) DeepCopyInto(out *GPUClassParameters)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GPUClassParameters) DeepCopyObject

func (in *GPUClassParameters) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GPUClassParametersList

type GPUClassParametersList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []GPUClassParameters `json:"items"`
}

GPUClassParametersList represents the "plural" of a DeviceClassParameters CRD object.

func (*GPUClassParametersList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUClassParametersList.

func (*GPUClassParametersList) DeepCopyInto

func (in *GPUClassParametersList) DeepCopyInto(out *GPUClassParametersList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GPUClassParametersList) DeepCopyObject

func (in *GPUClassParametersList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GPUClassParametersSpec

type GPUClassParametersSpec struct {
	DeviceSelector []DeviceSelector `json:"deviceSelector,omitempty"`
}

GPUClassParametersSpec is the spec for the GPUClassParametersSpec CRD.

func (*GPUClassParametersSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUClassParametersSpec.

func (*GPUClassParametersSpec) DeepCopyInto

func (in *GPUClassParametersSpec) DeepCopyInto(out *GPUClassParametersSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GPUDevice

type GPUDevice struct {
	UUID        string `json:"uuid"`
	ProductName string `json:"productName"`
	Vendor      string `json:"vendor"`
}

GPUDevice represents an allocatable GPU device on a node.

func (*GPUDevice) DeepCopy

func (in *GPUDevice) DeepCopy() *GPUDevice

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUDevice.

func (*GPUDevice) DeepCopyInto

func (in *GPUDevice) DeepCopyInto(out *GPUDevice)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GPURequirements

type GPURequirements struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec GPURequirementsSpec `json:"spec,omitempty"`
}

GPURequirements is a set of requirement parameters that is referenced by a ResourceClaim object.

func (*GPURequirements) DeepCopy

func (in *GPURequirements) DeepCopy() *GPURequirements

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPURequirements.

func (*GPURequirements) DeepCopyInto

func (in *GPURequirements) DeepCopyInto(out *GPURequirements)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GPURequirements) DeepCopyObject

func (in *GPURequirements) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GPURequirementsList

type GPURequirementsList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []GPURequirements `json:"items"`
}

GPURequirementsList represents the "plural" of a ResourceClaimParameters CRD object.

func (*GPURequirementsList) DeepCopy

func (in *GPURequirementsList) DeepCopy() *GPURequirementsList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPURequirementsList.

func (*GPURequirementsList) DeepCopyInto

func (in *GPURequirementsList) DeepCopyInto(out *GPURequirementsList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GPURequirementsList) DeepCopyObject

func (in *GPURequirementsList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GPURequirementsSpec

type GPURequirementsSpec struct {
	Count  int `json:"count,omitempty"`
	Memory resource.Quantity
}

GPURequirementsSpec is the spec for the GPURequirements CRD.

func (*GPURequirementsSpec) DeepCopy

func (in *GPURequirementsSpec) DeepCopy() *GPURequirementsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPURequirementsSpec.

func (*GPURequirementsSpec) DeepCopyInto

func (in *GPURequirementsSpec) DeepCopyInto(out *GPURequirementsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeGPUSlices

type NodeGPUSlices struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	AllocatableGPUs []*GPUDevice                   `json:"allocatedGPUs,omitempty"`
	Allocations     map[string][]*DeviceAllocation `json:"allocations,omitempty"`
	NodeSuitability map[string]NodeSuitability     `json:"nodeSuitability,omitempty"`
}

NodeGPUSlices holds the spec of GPU devices on a node, and the devices' allocation state. A GPU device can be in one of three states: allocatable, allocated, or prepared. The name of the object is the name of the node.

func (*NodeGPUSlices) DeepCopy

func (in *NodeGPUSlices) DeepCopy() *NodeGPUSlices

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGPUSlices.

func (*NodeGPUSlices) DeepCopyInto

func (in *NodeGPUSlices) DeepCopyInto(out *NodeGPUSlices)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGPUSlices) DeepCopyObject

func (in *NodeGPUSlices) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeGPUSlicesList

type NodeGPUSlicesList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []NodeGPUSlices `json:"items"`
}

NodeGPUSlicesList represents a list of NodeDevices CRD objects.

func (*NodeGPUSlicesList) DeepCopy

func (in *NodeGPUSlicesList) DeepCopy() *NodeGPUSlicesList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGPUSlicesList.

func (*NodeGPUSlicesList) DeepCopyInto

func (in *NodeGPUSlicesList) DeepCopyInto(out *NodeGPUSlicesList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGPUSlicesList) DeepCopyObject

func (in *NodeGPUSlicesList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeSuitability

type NodeSuitability string

NodeSuitability describes the suitability of a node for running GPU workloads.

Jump to

Keyboard shortcuts

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