Documentation ¶
Index ¶
- func New(client *provreqclient.ProvisioningRequestClient, classes []ProvisioningClass) *provReqOrchestrator
- type ProvisioningClass
- type WrapperOrchestrator
- func (o *WrapperOrchestrator) Initialize(autoscalingContext *context.AutoscalingContext, ...)
- func (o *WrapperOrchestrator) ScaleUp(unschedulablePods []*apiv1.Pod, nodes []*apiv1.Node, ...) (*status.ScaleUpStatus, errors.AutoscalerError)
- func (o *WrapperOrchestrator) ScaleUpToNodeGroupMinSize(nodes []*apiv1.Node, nodeInfos map[string]*framework.NodeInfo) (*status.ScaleUpStatus, errors.AutoscalerError)
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 ProvisioningClass ¶
type ProvisioningClass interface { Provision([]*apiv1.Pod, []*apiv1.Node, []*appsv1.DaemonSet, map[string]*framework.NodeInfo) (*status.ScaleUpStatus, ca_errors.AutoscalerError) Initialize(*context.AutoscalingContext, *ca_processors.AutoscalingProcessors, *clusterstate.ClusterStateRegistry, estimator.EstimatorBuilder, taints.TaintConfig, *scheduling.HintingSimulator) }
ProvisioningClass is an interface for ProvisioningRequests.
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.