Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultRecommenderName designates the recommender that will handle MPA objects which don't specify // recommender name explicitly (and so implicitly specify that the default recommender should handle them) DefaultRecommenderName = "default" )
Variables ¶
This section is empty.
Functions ¶
func NewPodListerAndOOMObserver ¶
func NewPodListerAndOOMObserver(kubeClient kube_client.Interface, namespace string) (v1lister.PodLister, oom.Observer)
NewPodListerAndOOMObserver creates pair of pod lister and OOM observer.
func WatchEvictionEventsWithRetries ¶
func WatchEvictionEventsWithRetries(kubeClient kube_client.Interface, observer oom.Observer, namespace string)
WatchEvictionEventsWithRetries watches new Events with reason=Evicted and passes them to the observer.
Types ¶
type ClusterStateFeeder ¶
type ClusterStateFeeder interface { // InitFromHistoryProvider loads historical pod spec into clusterState. InitFromHistoryProvider(historyProvider history.HistoryProvider) // InitFromCheckpoints loads historical checkpoints into clusterState. InitFromCheckpoints() // LoadMPAs updates clusterState with current state of MPAs. LoadMPAs() // LoadPods updates clusterState with current specification of Pods and their Containers. LoadPods() // LoadRealTimeMetrics updates clusterState with current usage metrics of containers. LoadRealTimeMetrics() // GarbageCollectCheckpoints removes historical checkpoints that don't have a matching MPA. GarbageCollectCheckpoints() }
ClusterStateFeeder can update state of ClusterState object.
func NewClusterStateFeeder ¶
func NewClusterStateFeeder(config *rest.Config, clusterState *model.ClusterState, memorySave bool, namespace, metricsClientName string, recommenderName string) ClusterStateFeeder
NewClusterStateFeeder creates new ClusterStateFeeder with internal data providers, based on kube client config. Deprecated; Use ClusterStateFeederFactory instead.
type ClusterStateFeederFactory ¶
type ClusterStateFeederFactory struct { ClusterState *model.ClusterState KubeClient kube_client.Interface MetricsClient metrics.MetricsClient MpaCheckpointClient vpa_api.VerticalPodAutoscalerCheckpointsGetter MpaLister mpa_lister.MultidimPodAutoscalerLister PodLister v1lister.PodLister OOMObserver oom.Observer SelectorFetcher target.MpaTargetSelectorFetcher MemorySaveMode bool ControllerFetcher controllerfetcher.ControllerFetcher RecommenderName string }
ClusterStateFeederFactory makes instances of ClusterStateFeeder.
func (ClusterStateFeederFactory) Make ¶
func (m ClusterStateFeederFactory) Make() *clusterStateFeeder
Make creates new ClusterStateFeeder with internal data providers, based on kube client.
Click to show internal directories.
Click to hide internal directories.