pkg

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configset

func Configset() *rest.Config

Types

type Controller

type Controller interface {
	Run(ctx context.Context) error
}

func NewController

func NewController(opts Options) Controller

type Options

type Options struct {
	// DryRun=true won't evict Pods for real
	DryRun bool

	// MemoryUsageThreshold is the threshold (0-100) above which a Pod is considered
	// as overusing its memory.
	MemoryUsageThreshold int

	// EvictionPause is the delay we wait between two evictions, to prevent removing
	// too many Pods at once. Else we could more easily have downtimes if Deployments
	// don't specify a PodDisruptionBudget.
	EvictionPause time.Duration

	// MemoryUsageCheckInterval is how often we check the memory usage.
	// It doesn't need to be too frequent, as we have to wait for the metric-server
	// to refresh the metrics all the time.
	MemoryUsageCheckInterval time.Duration
}

type PodMetricsInterfaceList

type PodMetricsInterfaceList interface {
	List(ctx context.Context, opts metav1.ListOptions) (*metricsv1beta1.PodMetricsList, error)
}

Jump to

Keyboard shortcuts

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