actionablecluster

package
v0.0.0-...-da31dff 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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const NodesNotReadyAfterStartTimeout = 10 * time.Minute

NodesNotReadyAfterStartTimeout How long should Cluster Autoscaler wait for nodes to become ready after start.

Variables

This section is empty.

Functions

func OnEmptyCluster

func OnEmptyCluster(context *context.AutoscalingContext, status string, emitEvent bool)

OnEmptyCluster runs actions if the cluster is empty

Types

type ActionableClusterProcessor

type ActionableClusterProcessor interface {
	// ShouldAbort is the func that will return where the cluster is in an actionable state or not
	ShouldAbort(context *context.AutoscalingContext, allNodes []*apiv1.Node, readyNodes []*apiv1.Node, currentTime time.Time) (abortLoop bool, err errors.AutoscalerError)
	CleanUp()
}

ActionableClusterProcessor defines interface for whether action can be taken on the cluster or not

func NewCustomActionableClusterProcessor

func NewCustomActionableClusterProcessor(startTime time.Time, nodeNotReadyTimeout time.Duration) ActionableClusterProcessor

NewCustomActionableClusterProcessor returns a new instance with custom values

func NewDefaultActionableClusterProcessor

func NewDefaultActionableClusterProcessor() ActionableClusterProcessor

NewDefaultActionableClusterProcessor returns a new Processor instance

type EmptyClusterProcessor

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

EmptyClusterProcessor implements ActionableClusterProcessor by using ScaleUpFromZero flag and other node readiness conditions to check whether the cluster is actionable or not

func (*EmptyClusterProcessor) CleanUp

func (e *EmptyClusterProcessor) CleanUp()

CleanUp cleans up the Processor

func (*EmptyClusterProcessor) ShouldAbort

func (e *EmptyClusterProcessor) ShouldAbort(context *context.AutoscalingContext, allNodes []*apiv1.Node, readyNodes []*apiv1.Node, currentTime time.Time) (bool, errors.AutoscalerError)

ShouldAbort give the decision on whether CA can act on the cluster

Jump to

Keyboard shortcuts

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