dynamicpolicy

package
v0.5.45 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 68 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccompanyResourceRegistry = accompanyresource.NewRegistry()

Functions

func NewDynamicPolicy

func NewDynamicPolicy(agentCtx *agent.GenericContext, conf *config.Configuration,
	_ interface{}, agentName string,
) (bool, agent.Component, error)

Types

type DynamicPolicy

type DynamicPolicy struct {
	sync.RWMutex
	pluginapi.UnimplementedResourcePluginServer

	advisorapi.UnimplementedCPUPluginServer
	// contains filtered or unexported fields
}

DynamicPolicy is the policy that's used by default; it will consider the dynamic running information to calculate and adjust resource requirements and configurations

func (*DynamicPolicy) Allocate

Allocate is called during pod admit so that the resource plugin can allocate corresponding resource for the container according to resource request

func (*DynamicPolicy) AllocateForPod added in v0.5.8

AllocateForPod is called during pod admit so that the resource plugin can allocate corresponding resource for the pod according to resource request

func (*DynamicPolicy) GetCheckpoint

GetCheckpoint works with serveForAdvisor to provide ckp for cpu-advisor

func (*DynamicPolicy) GetExclusiveIRQCPUSet added in v0.5.32

func (p *DynamicPolicy) GetExclusiveIRQCPUSet() (machine.CPUSet, error)

GetExclusiveIRQCPUSet retrieves the cpu set of cores that are exclusive for irq binding.

func (*DynamicPolicy) GetIRQForbiddenCores added in v0.5.32

func (p *DynamicPolicy) GetIRQForbiddenCores() (machine.CPUSet, error)

GetIRQForbiddenCores retrieves the cpu set of cores that are forbidden for irq binding.

func (*DynamicPolicy) GetPodTopologyHints added in v0.5.8

func (p *DynamicPolicy) GetPodTopologyHints(ctx context.Context,
	req *pluginapi.PodResourceRequest,
) (resp *pluginapi.PodResourceHintsResponse, err error)

GetPodTopologyHints returns hints of corresponding resources for pod

func (*DynamicPolicy) GetResourcePluginOptions

func (p *DynamicPolicy) GetResourcePluginOptions(context.Context,
	*pluginapi.Empty,
) (*pluginapi.ResourcePluginOptions, error)

GetResourcePluginOptions returns options to be communicated with Resource Manager

func (*DynamicPolicy) GetResourcesAllocation

GetResourcesAllocation returns allocation results of corresponding resources

func (*DynamicPolicy) GetStepExpandableCPUsMax added in v0.5.32

func (p *DynamicPolicy) GetStepExpandableCPUsMax() int

func (*DynamicPolicy) GetTopologyAwareAllocatableResources

GetTopologyAwareAllocatableResources returns corresponding allocatable resources as machineInfo aware format

func (*DynamicPolicy) GetTopologyAwareResources

GetTopologyAwareResources returns allocation results of corresponding resources as machineInfo aware format

func (*DynamicPolicy) GetTopologyHints

func (p *DynamicPolicy) GetTopologyHints(ctx context.Context,
	req *pluginapi.ResourceRequest,
) (resp *pluginapi.ResourceHintsResponse, err error)

GetTopologyHints returns hints of corresponding resources

func (*DynamicPolicy) ListContainers added in v0.5.32

func (p *DynamicPolicy) ListContainers() ([]irqtuner.ContainerInfo, error)

ListContainers retrieves the container info of all running containers.

func (*DynamicPolicy) Name

func (p *DynamicPolicy) Name() string

func (*DynamicPolicy) PreStartContainer

PreStartContainer is called, if indicated by resource plugin during registration phase, before each container start. Resource plugin can run resource specific operations such as resetting the resource before making resources available to the container

func (*DynamicPolicy) RemovePod

func (*DynamicPolicy) ResourceName

func (p *DynamicPolicy) ResourceName() string

func (*DynamicPolicy) SetExclusiveIRQCPUSet added in v0.5.32

func (p *DynamicPolicy) SetExclusiveIRQCPUSet(irqCPUSet machine.CPUSet) error

SetExclusiveIRQCPUSet sets the exclusive cpu set for Interrupt.

func (*DynamicPolicy) SetIRQTuner added in v0.5.32

func (p *DynamicPolicy) SetIRQTuner(irqTuner irqtuner.Tuner)

func (*DynamicPolicy) Start

func (p *DynamicPolicy) Start() (err error)

func (*DynamicPolicy) Stop

func (p *DynamicPolicy) Stop() error

Jump to

Keyboard shortcuts

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