loop

package
v0.0.0-...-7b64836 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAutoscalerOnce

func RunAutoscalerOnce(autoscaler autoscaler, healthCheck *metrics.HealthCheck, loopStart time.Time)

RunAutoscalerOnce triggers a single autoscaling iteration.

Types

type LoopTrigger

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

LoopTrigger object implements criteria used to start new autoscaling iteration

func NewLoopTrigger

func NewLoopTrigger(scalingTimesGetter scalingTimesGetter, provisioningRequestProcessTimeGetter provisioningRequestProcessingTimesGetter, podObserver *UnschedulablePodObserver, scanInterval time.Duration) *LoopTrigger

NewLoopTrigger creates a LoopTrigger object

func (*LoopTrigger) Wait

func (t *LoopTrigger) Wait(lastRun time.Time)

Wait waits for the next autoscaling iteration

type UnschedulablePodObserver

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

UnschedulablePodObserver triggers a new loop if there are new unschedulable pods

func StartPodObserver

func StartPodObserver(ctx context.Context, kubeClient kube_client.Interface) *UnschedulablePodObserver

StartPodObserver creates an informer and starts a goroutine watching for newly added or updated pods. Each time a new unschedulable pod appears or a change causes a pod to become unschedulable, a message is sent to the UnschedulablePodObserver's channel.

Jump to

Keyboard shortcuts

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