autoscale

package
v1.11.4-release Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeNewNodeIds

func ComputeNewNodeIds(nodes []v1.Node, numNewNodes int32) []int32

New nodes are assigned an Id in the following manner:

- Assigned node Ids will always be a non-negative integer starting with zero

- extract and sort the node Ids in the provided node list

- iterate through the node Id list starting with zero. For any unassigned node Id, assign it

- return the list of assigned node Ids.

Types

type HorizontalDownscaleStrategy

type HorizontalDownscaleStrategy interface {
	Type() v1alpha1.ClusterScalingStrategy

	// returns the set of "numNodesToRemove" nodes that should be removed from the cluster
	ScaleDown(numNodesToRemove int32) (nodesToRemove []v1.Node, err error)
}

type HorizontalUpscaleStrategy

type HorizontalUpscaleStrategy interface {
	Type() v1alpha1.ClusterScalingStrategy

	// returns the set of "numNodesToAdd" nodes that should be added to the cluster
	ScaleUp(numNodesToAdd int32) (newNodes []v1.Node, err error)
}

type LIFOHorizontalDownscaleStrategy

type LIFOHorizontalDownscaleStrategy struct {
	NifiCluster             *v1.NifiCluster
	NifiNodeGroupAutoscaler *v1alpha1.NifiNodeGroupAutoscaler
}

LIFO downscale strategy Nodes are added by monotonically increasing nodeId, so LIFO is simply a strategy where the highest ID nodes are removed first.

func (*LIFOHorizontalDownscaleStrategy) ScaleDown

func (lifo *LIFOHorizontalDownscaleStrategy) ScaleDown(numNodesToRemove int32) (nodesToRemove []v1.Node, err error)

returns the set of "numNodesToRemove" nodes that should be removed from the cluster.

func (*LIFOHorizontalDownscaleStrategy) Type

type SimpleHorizontalUpscaleStrategy

type SimpleHorizontalUpscaleStrategy struct {
	NifiCluster             *v1.NifiCluster
	NifiNodeGroupAutoscaler *v1alpha1.NifiNodeGroupAutoscaler
}

Simple upscale strategy A simple cluster upscale operation is simply adding a node to the existing node set.

func (*SimpleHorizontalUpscaleStrategy) ScaleUp

func (simple *SimpleHorizontalUpscaleStrategy) ScaleUp(numNodesToAdd int32) (newNodes []v1.Node, err error)

returns the set of "numNodesToAdd" nodes that should be added to the cluster.

func (*SimpleHorizontalUpscaleStrategy) Type

Jump to

Keyboard shortcuts

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