replicaupdater

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: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {

	// MetricClient is a client that polls the metrics from the pod.
	MetricClient metricsgetter.MetricGetter
	// contains filtered or unexported fields
}

Controller is the component that controls the number of replicas of a pod. For each pod under the same ServiceLevelAgreement, it periodically suggest new replica values.

func NewController

func NewController(kubernetesClientset *kubernetes.Clientset,
	saClientSet saclientset.Interface,
	informers informers.Informers,
	metricClient metricsgetter.MetricGetter) *Controller

NewController returns a new sample 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 is called when the controller has finished its work

type CustomLogic

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

TODO: lot of code is duplicated, we should try handle it CustomLogic is the logic that emulates the custom logic

type HPALogic

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

HPALogic is the logic that emulates the HPA logic

type Logic

type Logic interface {
	// contains filtered or unexported methods
}

Logic is the logic the controller uses to suggest new replica values for an application

type LogicState

type LogicState string
const (
	ScalingUpState   LogicState = "scaling_up"
	ScalingDownState LogicState = "scaling_down"
	SteadyState      LogicState = "steady"
)

Logic states

Jump to

Keyboard shortcuts

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