contentionmanager

package
v0.0.0-...-3acc49a Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const AgentName = "contention-manager"

AgentName is the controller name used both in logs and labels to identify it

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentionManager

type ContentionManager struct {
	CPUCapacity    *resource.Quantity
	MemoryCapacity *resource.Quantity
	PodScales      []*v1beta1.PodScale
	// contains filtered or unexported fields
}

ContentionManager embeds the contention resolution logic on a given Node.

func NewContentionManager

func NewContentionManager(n *corev1.Node, ns types.NodeScales, p []corev1.Pod, solver solverFn) *ContentionManager

NewContentionManager returns a new ContentionManager instance

func (*ContentionManager) Solve

func (m *ContentionManager) Solve() []*v1beta1.PodScale

Solve resolves the contentions between the podscales

type Controller

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

Controller is responsible of adjusting podscale partially computed by the recommender taking into account the actual node capacity

func NewController

func NewController(
	kubeClient kubernetes.Interface,
	podScalesClient clientset.Interface,
	informers informers.Informers,
	in chan types.NodeScales,
	out chan types.NodeScales) *Controller

NewController returns a new PodScale controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

func (*Controller) Shutdown

func (c *Controller) Shutdown()

Shutdown stops the contention manager

Jump to

Keyboard shortcuts

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