incubating

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedFeatures = internal.Features{
	AdminAccess:          true,
	PrioritizedList:      true,
	PartitionableDevices: true,
	DeviceTaints:         true,
}

SupportedFeatures includes all additional features, making this the variant that is used when any of those are enabled.

Functions

This section is empty.

Types

type Allocator

type Allocator struct {
	// contains filtered or unexported fields
}

func NewAllocator

func NewAllocator(ctx context.Context,
	features Features,
	allocatedDevices sets.Set[DeviceID],
	classLister DeviceClassLister,
	slices []*resourceapi.ResourceSlice,
	celCache *cel.Cache,
) (*Allocator, error)

NewAllocator returns an allocator for a certain set of claims or an error if some problem was detected which makes it impossible to allocate claims.

The returned Allocator can be used multiple times and is thread-safe.

func (*Allocator) Allocate

func (a *Allocator) Allocate(ctx context.Context, node *v1.Node, claims []*resourceapi.ResourceClaim) (finalResult []resourceapi.AllocationResult, finalErr error)

func (*Allocator) GetStats

func (a *Allocator) GetStats() Stats

type DeviceClassLister

type DeviceClassLister = internal.DeviceClassLister

type DeviceID

type DeviceID = internal.DeviceID

func MakeDeviceID

func MakeDeviceID(driver, pool, device string) DeviceID

type Features

type Features = internal.Features

type Pool

type Pool struct {
	PoolID
	IsIncomplete  bool
	IsInvalid     bool
	InvalidReason string
	Slices        []*draapi.ResourceSlice
}

func GatherPools

func GatherPools(ctx context.Context, slices []*resourceapi.ResourceSlice, node *v1.Node, features Features) ([]*Pool, error)

GatherPools collects information about all resource pools which provide devices that are accessible from the given node.

Out-dated slices are silently ignored. Pools may be incomplete (not all required slices available) or invalid (for example, device names not unique). Both is recorded in the result.

type PoolID

type PoolID struct {
	Driver, Pool draapi.UniqueString
}

func (PoolID) String

func (p PoolID) String() string

type Stats

type Stats = internal.Stats

Jump to

Keyboard shortcuts

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