package namedresources

import "k8s.io/kubernetes/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources"

Index

Functions

func AddAllocation

func AddAllocation(m *Model, result *resourceapi.NamedResourcesAllocationResult)

AddAllocation may get called after AddResources to mark some resource instances as allocated. The result parameter may be nil.

func AddResources

func AddResources(m *Model, resources *resourceapi.NamedResourcesResources)

AddResources must be called first to create entries for all existing resource instances. The resources parameter may be nil.

Types

type Controller

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

func NewClaimController

func NewClaimController(filter *resourceapi.NamedResourcesFilter, requests []*resourceapi.NamedResourcesRequest) (*Controller, error)

func (*Controller) Allocate

func (*Controller) NodeIsSuitable

func (c *Controller) NodeIsSuitable(ctx context.Context, model Model) (bool, error)

type InstanceAllocation

type InstanceAllocation struct {
	Allocated bool
	Instance  *resourceapi.NamedResourcesInstance
}

type Model

type Model struct {
	Instances []InstanceAllocation
}

Source Files

namedresourcesmodel.go

Version
v1.30.14
Published
Jun 17, 2025
Platform
darwin/amd64
Imports
7 packages
Last checked
4 minutes ago

Tools for package owners.