Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeNewNodeIds ¶
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 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 ¶
func (lifo *LIFOHorizontalDownscaleStrategy) Type() v1alpha1.ClusterScalingStrategy
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 ¶
func (simple *SimpleHorizontalUpscaleStrategy) Type() v1alpha1.ClusterScalingStrategy