orchestrator

package
v0.0.0-...-3080b95 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(client *provreqclient.ProvisioningRequestClient, classes []ProvisioningClass) *provReqOrchestrator

New return new orchestrator.

Types

type WrapperOrchestrator

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

WrapperOrchestrator is an orchestrator which wraps Scale Up for ProvisioningRequests and regular pods. Each loop WrapperOrchestrator split out regular and pods from ProvisioningRequest, pick one group that wasn't picked in the last loop and run ScaleUp for it.

func NewWrapperOrchestrator

func NewWrapperOrchestrator(provReqOrchestrator scaleup.Orchestrator) *WrapperOrchestrator

NewWrapperOrchestrator return WrapperOrchestrator

func (*WrapperOrchestrator) Initialize

func (o *WrapperOrchestrator) Initialize(
	autoscalingContext *context.AutoscalingContext,
	processors *ca_processors.AutoscalingProcessors,
	clusterStateRegistry *clusterstate.ClusterStateRegistry,
	estimatorBuilder estimator.EstimatorBuilder,
	taintConfig taints.TaintConfig,
)

Initialize initializes the orchestrator object with required fields.

func (*WrapperOrchestrator) ScaleUp

func (o *WrapperOrchestrator) ScaleUp(
	unschedulablePods []*apiv1.Pod,
	nodes []*apiv1.Node,
	daemonSets []*appsv1.DaemonSet,
	nodeInfos map[string]*framework.NodeInfo,
	allOrNothing bool,
) (*status.ScaleUpStatus, errors.AutoscalerError)

ScaleUp run scaleUp function for regular pods of pods from ProvisioningRequest.

func (*WrapperOrchestrator) ScaleUpToNodeGroupMinSize

func (o *WrapperOrchestrator) ScaleUpToNodeGroupMinSize(
	nodes []*apiv1.Node,
	nodeInfos map[string]*framework.NodeInfo,
) (*status.ScaleUpStatus, errors.AutoscalerError)

ScaleUpToNodeGroupMinSize tries to scale up node groups that have less nodes than the configured min size. The source of truth for the current node group size is the TargetSize queried directly from cloud providers. Returns appropriate status or error if an unexpected error occurred.

Jump to

Keyboard shortcuts

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