logic

package
v0.0.0-...-7600a38 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterControlledResources

func FilterControlledResources(estimation model.Resources, controlledResources []model.ResourceName) model.Resources

Types

type PodResourceRecommender

type PodResourceRecommender interface {
	GetRecommendedPodResources(containerNameToAggregateStateMap model.ContainerNameToAggregateStateMap) RecommendedPodResources
}

PodResourceRecommender computes resource recommendation for a Vpa object.

func CreatePodResourceRecommender

func CreatePodResourceRecommender() PodResourceRecommender

type RecommendedContainerResources

type RecommendedContainerResources struct {
	// Recommended optimal amount of resources.
	Target model.Resources
	// Recommended minimum amount of resources.
	LowerBound model.Resources
	// Recommended maximum amount of resources.
	UpperBound model.Resources
}

RecommendedContainerResources is the recommendation of resources for a container.

type RecommendedPodResources

type RecommendedPodResources map[string]RecommendedContainerResources

RecommendedPodResources is a Map from container name to recommended resources.

type ResourceEstimator

type ResourceEstimator interface {
	GetResourceEstimation(s *model.AggregateContainerState) model.Resources
}

ResourceEstimator is a function from AggregateContainerState to model.Resources, e.g. a prediction of resources needed by a group of containers.

func NewConstEstimator

func NewConstEstimator(resources model.Resources) ResourceEstimator

func NewPercentileEstimator

func NewPercentileEstimator(cpuPercentile float64, memoryPercentile float64) ResourceEstimator

func WithConfidenceMultiplier

func WithConfidenceMultiplier(multiplier, exponent float64, baseEstimator ResourceEstimator) ResourceEstimator

func WithMargin

func WithMargin(marginFraction float64, baseEstimator ResourceEstimator) ResourceEstimator

func WithMinResources

func WithMinResources(minResources model.Resources, baseEstimator ResourceEstimator) ResourceEstimator

Jump to

Keyboard shortcuts

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