Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AggregateContainerStateGCInterval defines how often expired AggregateContainerStates are garbage collected. AggregateContainerStateGCInterval = 1 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func GetContainerNameToAggregateStateMap ¶
func GetContainerNameToAggregateStateMap(vpa *model.Vpa) model.ContainerNameToAggregateStateMap
GetContainerNameToAggregateStateMap returns ContainerNameToAggregateStateMap for pods.
Types ¶
type Recommender ¶
type Recommender interface { // RunOnce performs one iteration of recommender duties followed by update of recommendations in VPA objects. RunOnce() // GetClusterState returns ClusterState used by Recommender GetClusterState() *model.ClusterState // GetClusterStateFeeder returns ClusterStateFeeder used by Recommender GetClusterStateFeeder() input.ClusterStateFeeder // UpdateVPAs computes recommendations and sends VPAs status updates to API Server UpdateVPAs() // MaintainCheckpoints stores current checkpoints in API Server and garbage collect old ones MaintainCheckpoints() // GarbageCollect removes old AggregateCollectionStates GarbageCollect() }
Recommender recommend resources for certain containers, based on utilization periodically got from metrics api.
func NewRecommender ¶
func NewRecommender(config *rest.Config, checkpointsGCInterval time.Duration, useCheckpoints bool) Recommender
NewRecommender creates a new recommender instance, which can be run in order to provide continuous resource recommendations for containers. It requires cluster configuration object and duration between recommender intervals.
Click to show internal directories.
Click to hide internal directories.