v1alpha1

package
v0.0.0-...-c16a028 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupName = "nas.gpu.resource.nvidia.com"
	Version   = "v1alpha1"

	NodeAllocationStateStatusReady    = "Ready"
	NodeAllocationStateStatusNotReady = "NotReady"
)

Variables

View Source
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
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   GroupName,
	Version: Version,
}

SchemeGroupVersion is group version used to register these objects.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Types

type AllocatableDevice

type AllocatableDevice struct {
	Gpu *AllocatableGpu       `json:"gpu,omitempty"`
	Mig *AllocatableMigDevice `json:"mig,omitempty"`
}

AllocatableDevice represents an allocatable device on a node.

func (*AllocatableDevice) DeepCopy

func (in *AllocatableDevice) DeepCopy() *AllocatableDevice

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

func (*AllocatableDevice) DeepCopyInto

func (in *AllocatableDevice) DeepCopyInto(out *AllocatableDevice)

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

func (AllocatableDevice) Type

func (d AllocatableDevice) Type() string

Type returns the type of AllocatableDevice this represents.

type AllocatableGpu

type AllocatableGpu struct {
	Index                 int    `json:"index"`
	UUID                  string `json:"uuid"`
	MigEnabled            bool   `json:"migEnabled"`
	MemoryBytes           uint64 `json:"memoryBytes"`
	ProductName           string `json:"productName"`
	Brand                 string `json:"brand"`
	Architecture          string `json:"architecture"`
	CUDAComputeCapability string `json:"cudaComputeCapability"`
	DriverVersion         string `json:"driverVersion"`
	CUDADriverVersion     string `json:"cudaDriverVersion"`
}

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 AllocatableMigDevice

type AllocatableMigDevice struct {
	Profile           string               `json:"profile"`
	ParentProductName string               `json:"parentProductName"`
	Placements        []MigDevicePlacement `json:"placements"`
}

AllocatableMigDevice represents an allocatable MIG device (and its possible placements) on a given type of GPU.

func (*AllocatableMigDevice) DeepCopy

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

func (*AllocatableMigDevice) DeepCopyInto

func (in *AllocatableMigDevice) DeepCopyInto(out *AllocatableMigDevice)

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

type AllocatedDevices

type AllocatedDevices struct {
	ClaimInfo *types.ClaimInfo     `json:"claimInfo"`
	Gpu       *AllocatedGpus       `json:"gpu,omitempty"`
	Mig       *AllocatedMigDevices `json:"mig,omitempty"`
}

AllocatedDevices represents a set of allocated devices.

func (*AllocatedDevices) DeepCopy

func (in *AllocatedDevices) DeepCopy() *AllocatedDevices

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

func (*AllocatedDevices) DeepCopyInto

func (in *AllocatedDevices) DeepCopyInto(out *AllocatedDevices)

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

func (AllocatedDevices) Type

func (r AllocatedDevices) Type() string

Type returns the type of AllocatedDevices this represents.

type AllocatedGpu

type AllocatedGpu struct {
	UUID string `json:"uuid,omitempty"`
}

AllocatedGpu represents an allocated GPU.

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 struct {
	Devices []AllocatedGpu      `json:"devices"`
	Sharing *sharing.GpuSharing `json:"sharing,omitempty"`
}

AllocatedGpus represents a set of allocated GPUs.

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 AllocatedMigDevice

type AllocatedMigDevice struct {
	Profile    string             `json:"profile"`
	ParentUUID string             `json:"parentUUID"`
	Placement  MigDevicePlacement `json:"placement"`
}

AllocatedMigDevice represents an allocated MIG device.

func (*AllocatedMigDevice) DeepCopy

func (in *AllocatedMigDevice) DeepCopy() *AllocatedMigDevice

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

func (*AllocatedMigDevice) DeepCopyInto

func (in *AllocatedMigDevice) DeepCopyInto(out *AllocatedMigDevice)

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

type AllocatedMigDevices

type AllocatedMigDevices struct {
	Devices []AllocatedMigDevice      `json:"devices"`
	Sharing *sharing.MigDeviceSharing `json:"sharing,omitempty"`
}

AllocatedMigDevices represents a set of allocated MIG devices.

func (*AllocatedMigDevices) DeepCopy

func (in *AllocatedMigDevices) DeepCopy() *AllocatedMigDevices

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

func (*AllocatedMigDevices) DeepCopyInto

func (in *AllocatedMigDevices) DeepCopyInto(out *AllocatedMigDevices)

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

type MigDevicePlacement

type MigDevicePlacement struct {
	Start int `json:"start"`
	Size  int `json:"size"`
}

MigDevicePlacement represents the placement of a MIG device within a GPU.

func (*MigDevicePlacement) DeepCopy

func (in *MigDevicePlacement) DeepCopy() *MigDevicePlacement

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

func (*MigDevicePlacement) DeepCopyInto

func (in *MigDevicePlacement) DeepCopyInto(out *MigDevicePlacement)

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

type NodeAllocationState

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

	Spec   NodeAllocationStateSpec `json:"spec,omitempty"`
	Status string                  `json:"status,omitempty"`
}

NodeAllocationState holds the state required for allocation on a node.

func NewNodeAllocationState

func NewNodeAllocationState(config *NodeAllocationStateConfig) *NodeAllocationState

func (*NodeAllocationState) DeepCopy

func (in *NodeAllocationState) DeepCopy() *NodeAllocationState

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

func (*NodeAllocationState) DeepCopyInto

func (in *NodeAllocationState) DeepCopyInto(out *NodeAllocationState)

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

func (*NodeAllocationState) DeepCopyObject

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

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

type NodeAllocationStateConfig

type NodeAllocationStateConfig struct {
	Name      string
	Namespace string
	Owner     *metav1.OwnerReference
}

func (*NodeAllocationStateConfig) DeepCopy

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

func (*NodeAllocationStateConfig) DeepCopyInto

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

type NodeAllocationStateList

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

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

NodeAllocationStateList represents the "plural" of a NodeAllocationState CRD object.

func (*NodeAllocationStateList) DeepCopy

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

func (*NodeAllocationStateList) DeepCopyInto

func (in *NodeAllocationStateList) DeepCopyInto(out *NodeAllocationStateList)

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

func (*NodeAllocationStateList) DeepCopyObject

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

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

type NodeAllocationStateSpec

type NodeAllocationStateSpec struct {
	AllocatableDevices []AllocatableDevice         `json:"allocatableDevices,omitempty"`
	AllocatedClaims    map[string]AllocatedDevices `json:"allocatedClaims,omitempty"`
	PreparedClaims     map[string]PreparedDevices  `json:"preparedClaims,omitempty"`
}

NodeAllocationStateSpec is the spec for the NodeAllocationState CRD.

func (*NodeAllocationStateSpec) DeepCopy

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

func (*NodeAllocationStateSpec) DeepCopyInto

func (in *NodeAllocationStateSpec) DeepCopyInto(out *NodeAllocationStateSpec)

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

type PreparedDevices

type PreparedDevices struct {
	Gpu *PreparedGpus       `json:"gpu,omitempty"`
	Mig *PreparedMigDevices `json:"mig,omitempty"`
}

PreparedDevices represents a set of prepared devices on a node.

func (*PreparedDevices) DeepCopy

func (in *PreparedDevices) DeepCopy() *PreparedDevices

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

func (*PreparedDevices) DeepCopyInto

func (in *PreparedDevices) DeepCopyInto(out *PreparedDevices)

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

func (PreparedDevices) Type

func (d PreparedDevices) Type() string

Type returns the type of PreparedDevices this represents.

type PreparedGpu

type PreparedGpu struct {
	UUID string `json:"uuid"`
}

PreparedGpu represents a prepared GPU on a node.

func (*PreparedGpu) DeepCopy

func (in *PreparedGpu) DeepCopy() *PreparedGpu

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

func (*PreparedGpu) DeepCopyInto

func (in *PreparedGpu) DeepCopyInto(out *PreparedGpu)

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

type PreparedGpus

type PreparedGpus struct {
	Devices []PreparedGpu `json:"devices"`
}

PreparedGpus represents a set of prepared GPUs.

func (*PreparedGpus) DeepCopy

func (in *PreparedGpus) DeepCopy() *PreparedGpus

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

func (*PreparedGpus) DeepCopyInto

func (in *PreparedGpus) DeepCopyInto(out *PreparedGpus)

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

type PreparedMigDevice

type PreparedMigDevice struct {
	UUID       string             `json:"uuid"`
	Profile    string             `json:"profile"`
	ParentUUID string             `json:"parentUUID"`
	Placement  MigDevicePlacement `json:"placement"`
}

PreparedMigDevice represents a prepared MIG device on a node.

func (*PreparedMigDevice) DeepCopy

func (in *PreparedMigDevice) DeepCopy() *PreparedMigDevice

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

func (*PreparedMigDevice) DeepCopyInto

func (in *PreparedMigDevice) DeepCopyInto(out *PreparedMigDevice)

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

type PreparedMigDevices

type PreparedMigDevices struct {
	Devices []PreparedMigDevice `json:"devices"`
}

PreparedMigDevices represents a set of prepared MIG devices on a node.

func (*PreparedMigDevices) DeepCopy

func (in *PreparedMigDevices) DeepCopy() *PreparedMigDevices

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

func (*PreparedMigDevices) DeepCopyInto

func (in *PreparedMigDevices) DeepCopyInto(out *PreparedMigDevices)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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