common

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCrossDPUResourceTypes

func ValidateCrossDPUResourceTypes(defaultResourcePrefix string, input NodeInputConfig) field.ErrorList

ValidateCrossDPUResourceTypes checks that the same prefix/name is not used as both vf and sf across DPUs. The device plugin has one deviceType per extended resource, so a type conflict cannot be represented in the generated config.

func ValidateDevicePluginResources

func ValidateDevicePluginResources(basePath *field.Path, defaultResourcePrefix string, resources []noderesourcesv1.DevicePluginResource) field.ErrorList

ValidateDevicePluginResources validates a list of DevicePluginResource. It checks that resource Name + Prefix combinations are unique, resource names match the required pattern, range start is less than or equal to end, and there are no overlapping function indexes for the same type and PF across all resources.

Validation does not stop at the first error: all detected issues are returned as a field.ErrorList suitable for webhook validation responses.

func ValidateNodeSRIOVDevicePluginConfig

func ValidateNodeSRIOVDevicePluginConfig(defaultResourcePrefix string, cfg *noderesourcesv1.NodeSRIOVDevicePluginConfig) field.ErrorList

ValidateNodeSRIOVDevicePluginConfig validates a NodeSRIOVDevicePluginConfig.

Types

type NodeInputConfig

type NodeInputConfig map[string][]noderesourcesv1.DevicePluginResource

NodeInputConfig is the per-node input configuration passed to the init container. Key is the DPU serial number, value is the list of device plugin resources.

Jump to

Keyboard shortcuts

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