input

package
v0.0.0-...-e87aea4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPodListerAndOOMObserver

func NewPodListerAndOOMObserver(kubeClient kube_client.Interface) (v1lister.PodLister, oom.Observer)

NewPodListerAndOOMObserver creates pair of pod lister and OOM observer.

func WatchEvictionEventsWithRetries

func WatchEvictionEventsWithRetries(kubeClient kube_client.Interface, observer oom.Observer)

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()

	// LoadVPAs updates clusterState with current state of VPAs.
	LoadVPAs()

	// LoadPods updates slusterState 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 VPA.
	GarbageCollectCheckpoints()
}

ClusterStateFeeder can update state of ClusterState object.

func NewClusterStateFeeder

func NewClusterStateFeeder(config *rest.Config, clusterState *model.ClusterState, memorySave bool) 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
	VpaCheckpointClient vpa_api.VerticalPodAutoscalerCheckpointsGetter
	VpaLister           vpa_lister.VerticalPodAutoscalerLister
	PodLister           v1lister.PodLister
	OOMObserver         oom.Observer
	SelectorFetcher     target.VpaTargetSelectorFetcher
	MemorySaveMode      bool
	ControllerFetcher   controllerfetcher.ControllerFetcher
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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