logic

package
v0.0.0-...-572177c Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateContainerState

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

AggregateContainerState holds input signals aggregated from a set of containers. It can be used as an input to compute the recommendation.

type PodResourceRecommender

type PodResourceRecommender interface {
	GetRecommendedPodResources(vpa *model.Vpa) RecommendedPodResources
}

PodResourceRecommender computes resource recommendation for a Vpa object.

func NewPodResourceRecommender

func NewPodResourceRecommender(
	targetEstimator ResourceEstimator,
	lowerBoundEstimator ResourceEstimator,
	upperBoundEstimator ResourceEstimator) PodResourceRecommender

NewPodResourceRecommender returns a new PodResourceRecommender which is an aggregation of three ResourceEstimators, one for each of the target, min and max recommended resources.

type RecommendedContainerResources

type RecommendedContainerResources struct {
	// Recommended optimal amount of resources.
	Target model.Resources
	// Recommended minimum amount of resources.
	MinRecommended model.Resources
	// Recommended maximum amount of resources.
	MaxRecommended 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 *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

NewConstEstimator returns a new constEstimator with given resources.

func NewPercentileEstimator

func NewPercentileEstimator(cpuPercentile float64, memoryPercentile float64) ResourceEstimator

NewPercentileEstimator returns a new percentileEstimator that uses provided percentiles.

Jump to

Keyboard shortcuts

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