v1alpha1

package
v0.1.0-latest-stable Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the noderesources v1alpha1 API group +kubebuilder:object:generate=true +groupName=noderesources.dpu.nvidia.com

Index

Constants

View Source
const (
	// NodeSRIOVDevicePluginConfigKind is the kind of the NodeSRIOVDevicePluginConfig in string format.
	NodeSRIOVDevicePluginConfigKind = "NodeSRIOVDevicePluginConfig"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "noderesources.dpu.nvidia.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// NodeSRIOVDevicePluginConfigGroupVersionKind is the GroupVersionKind of the NodeSRIOVDevicePluginConfig object
	NodeSRIOVDevicePluginConfigGroupVersionKind = GroupVersion.WithKind(NodeSRIOVDevicePluginConfigKind)
)

Functions

This section is empty.

Types

type DevicePluginResource

type DevicePluginResource struct {
	// Name is the endpoint resource name for the device plugin.
	// Should contain only alphanumeric characters, underscores and hyphens.
	// The full extended resource name will be constructed as resource-prefix/name.
	// Example: pods_vf, ovnk_mgmt_vf, pods_sf
	// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9_-]+$`
	// +kubebuilder:validation:MinLength=1
	// +required
	Name string `json:"name"`

	// ResourcePrefix is the resource prefix used by the device plugin to prefix the resource name.
	// If not set, the default resource prefix will be used.
	// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
	// +optional
	ResourcePrefix *string `json:"resourcePrefix,omitempty"`

	// Type specifies the type of the device plugin resource.
	// +required
	Type DevicePluginResourceType `json:"type"`

	// Options contains additional options for the device plugin resource.
	// +optional
	Options *DevicePluginResourceOptions `json:"options,omitempty"`

	// Ranges specifies the function ranges on PFs to be included in this resource.
	// For type sf, each range must set both start and end.
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=1024
	// +required
	Ranges []FunctionRange `json:"ranges"`
}

DevicePluginResource defines a single device plugin resource configuration. +kubebuilder:validation:XValidation:rule="self.type != 'sf' || self.ranges.all(r, has(r.start) && has(r.end))",message="start and end must be set when type is sf"

func (*DevicePluginResource) DeepCopy

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

func (*DevicePluginResource) DeepCopyInto

func (in *DevicePluginResource) DeepCopyInto(out *DevicePluginResource)

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

type DevicePluginResourceOptions

type DevicePluginResourceOptions struct {
	// IsRdma indicates whether RDMA is enabled for this resource.
	// +optional
	IsRdma *bool `json:"isRdma,omitempty"`

	// NeedVhostNet mounts /dev/vhost-net and /dev/net/tun with the allocated devices.
	// Defaults to false.
	// +optional
	NeedVhostNet *bool `json:"needVhostNet,omitempty"`
}

DevicePluginResourceOptions contains additional options for a device plugin resource.

func (*DevicePluginResourceOptions) DeepCopy

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

func (*DevicePluginResourceOptions) DeepCopyInto

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

type DevicePluginResourceType

type DevicePluginResourceType string

DevicePluginResourceType specifies the type of the device plugin resource. +kubebuilder:validation:Enum=vf;sf

const (
	// DevicePluginResourceTypeVF represents a Virtual Function resource.
	DevicePluginResourceTypeVF DevicePluginResourceType = "vf"
	// DevicePluginResourceTypeSF represents a Scalable Function resource.
	DevicePluginResourceTypeSF DevicePluginResourceType = "sf"
)

func (DevicePluginResourceType) IsSupported

func (t DevicePluginResourceType) IsSupported() bool

IsSupported reports whether t is a recognized device plugin resource type.

type FunctionRange

type FunctionRange struct {
	// PFIndex is the index of the Physical Function.
	// +kubebuilder:validation:Minimum=0
	// +required
	PFIndex int32 `json:"pfIndex"`

	// Start is the starting function index (inclusive).
	// If not set, the range starts from index 0.
	// Required when type is sf. SF ranges are contiguous: every index from
	// start to end (inclusive) must exist on the PF.
	// +kubebuilder:validation:Minimum=0
	// +optional
	Start *int32 `json:"start,omitempty"`

	// End is the ending function index (inclusive).
	// If not set, the range extends to the last function of this type on the PF.
	// Required when type is sf. SF ranges are contiguous: every index from
	// start to end (inclusive) must exist on the PF.
	// +kubebuilder:validation:Minimum=0
	// +optional
	End *int32 `json:"end,omitempty"`
}

FunctionRange defines a range of functions (Virtual Functions or Scalable Functions) on a Physical Function. +kubebuilder:validation:XValidation:rule="!has(self.start) || !has(self.end) || self.start <= self.end",message="start must be less than or equal to end"

func (*FunctionRange) DeepCopy

func (in *FunctionRange) DeepCopy() *FunctionRange

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

func (*FunctionRange) DeepCopyInto

func (in *FunctionRange) DeepCopyInto(out *FunctionRange)

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

type NodeSRIOVDevicePluginConfig

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

	Spec   NodeSRIOVDevicePluginConfigSpec   `json:"spec,omitempty"`
	Status NodeSRIOVDevicePluginConfigStatus `json:"status,omitempty"`
}

NodeSRIOVDevicePluginConfig is the Schema for the nodesriovdevicepluginconfigs API

func (*NodeSRIOVDevicePluginConfig) DeepCopy

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

func (*NodeSRIOVDevicePluginConfig) DeepCopyInto

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

func (*NodeSRIOVDevicePluginConfig) DeepCopyObject

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

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

type NodeSRIOVDevicePluginConfigList

type NodeSRIOVDevicePluginConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NodeSRIOVDevicePluginConfig `json:"items"`
}

NodeSRIOVDevicePluginConfigList contains a list of NodeSRIOVDevicePluginConfig

func (*NodeSRIOVDevicePluginConfigList) DeepCopy

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

func (*NodeSRIOVDevicePluginConfigList) DeepCopyInto

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

func (*NodeSRIOVDevicePluginConfigList) DeepCopyObject

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

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

type NodeSRIOVDevicePluginConfigSpec

type NodeSRIOVDevicePluginConfigSpec struct {
	// DevicePluginResources is the list of device plugin resource configurations.
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=64
	// +required
	DevicePluginResources []DevicePluginResource `json:"devicePluginResources"`
}

NodeSRIOVDevicePluginConfigSpec defines the desired state of NodeSRIOVDevicePluginConfig

func (*NodeSRIOVDevicePluginConfigSpec) DeepCopy

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

func (*NodeSRIOVDevicePluginConfigSpec) DeepCopyInto

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

type NodeSRIOVDevicePluginConfigStatus

type NodeSRIOVDevicePluginConfigStatus struct {
	// Conditions exposes the current state of the NodeSRIOVDevicePluginConfig.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// ObservedGeneration records the Generation observed on the object the last time it was patched.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

NodeSRIOVDevicePluginConfigStatus defines the observed state of NodeSRIOVDevicePluginConfig

func (*NodeSRIOVDevicePluginConfigStatus) DeepCopy

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

func (*NodeSRIOVDevicePluginConfigStatus) DeepCopyInto

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

Jump to

Keyboard shortcuts

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