Documentation
¶
Index ¶
Constants ¶
View Source
const (
PredictPath = "/v1/predict/online/"
)
Variables ¶
This section is empty.
Functions ¶
func FilterControlledResources ¶
func FilterControlledResources(estimation model.Resources, controlledResources []model.ResourceName) model.Resources
FilterControlledResources returns estimations from 'estimation' only for resources present in 'controlledResources'.
Types ¶
type Interface ¶
type Interface interface {
// GetAllocatableForBatch return allocatable resources for offline jobs
GetAllocatableForBatch() v1.ResourceList
// GetReservedResource return reserved resource quantity
GetReservedResource() v1.ResourceList
// Run starts predict
Run(stop <-chan struct{})
// module name
Name() string
}
Interface is the predict interface
func NewPredictorOrDie ¶
func NewPredictorOrDie(configs []types.PredictConfig, input statestore.StateStore) Interface
NewPredictorOrDie creates a new predictor
type PodResourceRecommender ¶
type PodResourceRecommender interface {
GetRecommendedPodResources(
containerNameToAggregateStateMap model.ContainerNameToAggregateStateMap) RecommendedPodResources
}
PodResourceRecommender computes resource recommendation for a Vpa object.
func CreatePodResourceRecommender ¶
func CreatePodResourceRecommender(config types.LocalPredictConfig) PodResourceRecommender
CreatePodResourceRecommender returns the primary recommender.
type Predictor ¶
type Predictor interface {
// Predict predicts resources used by online and system pods
Predict() v1.ResourceList
// AddSample starts predictor
AddSample(stop <-chan struct{})
}
Predictor predicts resources used by online and system pods
func NewLocalPredict ¶
func NewLocalPredict(config types.PredictConfig, input statestore.StateStore) Predictor
NewLocalPredict creates a local predictor
func NewVpaPredictOrDie ¶
func NewVpaPredictOrDie(config types.PredictConfig) Predictor
NewVpaPredictOrDie creates a vpa predictor
type RecommendedContainerResources ¶
type RecommendedContainerResources struct {
// Recommended optimal amount of resources.
Target 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.
Click to show internal directories.
Click to hide internal directories.