pressurecooker

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ComponentName = "pressurecooker"
View Source
const TaintKey = "pressurecooker/load-exceeded"

Variables

This section is empty.

Functions

This section is empty.

Types

type Evicter

type Evicter struct {
	// contains filtered or unexported fields
}

func NewEvicter

func NewEvicter(client kubernetes.Interface, threshold float64, nodeName string, backoff string, minPodAge string) (*Evicter, error)

func (*Evicter) CanEvict

func (e *Evicter) CanEvict() bool

func (*Evicter) EvictPod

func (e *Evicter) EvictPod(evt PressureThresholdEvent) (bool, error)

type PodCandidate

type PodCandidate struct {
	Pod   *v1.Pod
	Score int
}

type PodCandidateSet

type PodCandidateSet []PodCandidate

func PodCandidateSetFromPodList

func PodCandidateSetFromPodList(l *v1.PodList) PodCandidateSet

func (PodCandidateSet) Len

func (s PodCandidateSet) Len() int

func (PodCandidateSet) Less

func (s PodCandidateSet) Less(i, j int) bool

func (PodCandidateSet) SelectPodForEviction

func (s PodCandidateSet) SelectPodForEviction(minPodAge time.Duration) *v1.Pod

func (PodCandidateSet) Swap

func (s PodCandidateSet) Swap(i, j int)

type PressureThresholdEvent

type PressureThresholdEvent procfs.PSILine

type Tainter

type Tainter struct {
	// contains filtered or unexported fields
}

func NewTainter

func NewTainter(c kubernetes.Interface, nodeName string) (*Tainter, error)

func (*Tainter) IsNodeTainted

func (t *Tainter) IsNodeTainted() (bool, error)

func (*Tainter) IsPressurecookerDisabled added in v0.2.4

func (t *Tainter) IsPressurecookerDisabled() (bool, error)

func (*Tainter) TaintNode

func (t *Tainter) TaintNode(evt PressureThresholdEvent) error

func (*Tainter) UntaintNode

func (t *Tainter) UntaintNode(evt PressureThresholdEvent) error

type Watcher

type Watcher struct {
	TickerInterval    time.Duration
	PressureThreshold float64
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(pressureThreshold float64) (*Watcher, error)

func (*Watcher) Run

func (w *Watcher) Run(closeChan chan struct{}) (<-chan PressureThresholdEvent, <-chan PressureThresholdEvent, <-chan error)

func (*Watcher) SetAsHigh

func (w *Watcher) SetAsHigh(high bool)

Jump to

Keyboard shortcuts

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