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(podObserver *UnschedulablePodObserver, scalingTimesGetter scalingTimesGetter, 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.
Click to show internal directories.
Click to hide internal directories.