Documentation
¶
Index ¶
- func AssessUpgradingPipelineType(ctx context.Context, existingUpgradingChildDef *unstructured.Unstructured) (apiv1.AssessmentResult, error)
- func CalculateScaleMinMaxValues(object map[string]any, podsCount int, pathToMin []string) (int64, int64, error)
- func ProcessResource(ctx context.Context, rolloutObject ProgressiveRolloutObject, ...) (bool, bool, time.Duration, error)
- type ProgressiveRolloutObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssessUpgradingPipelineType ¶ added in v0.15.0
func AssessUpgradingPipelineType(ctx context.Context, existingUpgradingChildDef *unstructured.Unstructured) (apiv1.AssessmentResult, error)
AssessUpgradingPipelineType makes an assessment of the upgrading child (either Pipeline or MonoVertex) to determine if it was successful, failed, or still not known Assessment: Success: phase must be "Running" and all conditions must be True Failure: phase is "Failed" or any condition is False Unknown: neither of the above if met
func CalculateScaleMinMaxValues ¶ added in v0.14.0
func CalculateScaleMinMaxValues(object map[string]any, podsCount int, pathToMin []string) (int64, int64, error)
CalculateScaleMinMaxValues computes new minimum and maximum scale values // for a given object based on the current number of pods.
Numaflow notes: - if max is unset, Numaflow uses DefaultMaxReplicas (50) - if min is unset or negative, Numaflow uses 0
Parameters:
- object: A map representing the object from which to retrieve min and max values.
- podsCount: The current number of pods.
- pathToMin: A slice of strings representing the path to the min value in the object.
Returns:
- newMin: The adjusted minimum scale value.
- newMax: The adjusted maximum scale value.
- error: An error if there is an issue retrieving the min or max values.
func ProcessResource ¶ added in v0.13.0
func ProcessResource( ctx context.Context, rolloutObject ProgressiveRolloutObject, existingPromotedChild *unstructured.Unstructured, promotedDifference bool, controller progressiveController, c client.Client, ) (bool, bool, time.Duration, error)
return: - whether we're done - whether we just created a new child - duration indicating the requeue delay for the controller to use for next reconciliation - error if any
Types ¶
type ProgressiveRolloutObject ¶ added in v0.14.0
type ProgressiveRolloutObject interface {
ctlrcommon.RolloutObject
GetProgressiveStrategy() apiv1.ProgressiveStrategy
GetUpgradingChildStatus() *apiv1.UpgradingChildStatus
GetPromotedChildStatus() *apiv1.PromotedChildStatus
SetUpgradingChildStatus(*apiv1.UpgradingChildStatus)
// note this resets the entire Upgrading status struct which encapsulates the UpgradingChildStatus struct
ResetUpgradingChildStatus(upgradingChild *unstructured.Unstructured) error
SetPromotedChildStatus(*apiv1.PromotedChildStatus)
// note this resets the entire Promoted status struct which encapsulates the PromotedChildStatus struct
ResetPromotedChildStatus(promotedChild *unstructured.Unstructured) error
}
ProgressiveRolloutObject describes a Rollout instance that supports progressive upgrade