Documentation
¶
Index ¶
- Constants
- func DeriveControllerInstanceID(version string, childName string) string
- type NumaflowControllerRolloutReconciler
- func (r *NumaflowControllerRolloutReconciler) AssessResourceChain(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (apiv1.AssessmentResult, []apiv1.ResourceChainMemberStatus, []string, error)
- func (r *NumaflowControllerRolloutReconciler) AssessUpgradingChild(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (apiv1.AssessmentResult, string, error)
- func (r *NumaflowControllerRolloutReconciler) CheckForDifferences(ctx context.Context, rolloutObject ctlrcommon.RolloutObject, ...) (bool, error)
- func (r *NumaflowControllerRolloutReconciler) CheckForDifferencesWithRolloutDef(ctx context.Context, existingNumaflowController *unstructured.Unstructured, ...) (bool, error)
- func (r *NumaflowControllerRolloutReconciler) CreateUpgradingChildDefinition(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (*unstructured.Unstructured, error)
- func (r *NumaflowControllerRolloutReconciler) ErrorHandler(ctx context.Context, nfcRollout *apiv1.NumaflowControllerRollout, err error, ...)
- func (r *NumaflowControllerRolloutReconciler) GetChildTypeString() string
- func (r *NumaflowControllerRolloutReconciler) GetDesiredRiders(rolloutObject ctlrcommon.RolloutObject, childName string, ...) ([]riders.Rider, error)
- func (r *NumaflowControllerRolloutReconciler) GetExistingRiders(ctx context.Context, rolloutObject ctlrcommon.RolloutObject, upgrading bool) (unstructured.UnstructuredList, error)
- func (r *NumaflowControllerRolloutReconciler) GetPipelineList(ctx context.Context, rolloutNamespace string, rolloutName string) (unstructured.UnstructuredList, error)
- func (r *NumaflowControllerRolloutReconciler) GetRolloutKey(rolloutNamespace string, rolloutName string) string
- func (r *NumaflowControllerRolloutReconciler) GetTemplateArguments(child *unstructured.Unstructured) map[string]interface{}
- func (r *NumaflowControllerRolloutReconciler) IncrementChildCount(ctx context.Context, rolloutObject ctlrcommon.RolloutObject) (int32, error)
- func (r *NumaflowControllerRolloutReconciler) MarkRolloutPaused(ctx context.Context, rollout client.Object, paused bool)
- func (r *NumaflowControllerRolloutReconciler) ProcessPromotedChildPostFailure(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *NumaflowControllerRolloutReconciler) ProcessPromotedChildPostUpgradeStart(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *NumaflowControllerRolloutReconciler) ProcessPromotedChildPreUpgrade(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *NumaflowControllerRolloutReconciler) ProcessUpgradingChildPostFailure(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *NumaflowControllerRolloutReconciler) ProcessUpgradingChildPostUpgradeStart(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *NumaflowControllerRolloutReconciler) ProcessUpgradingChildPreUpgrade(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *NumaflowControllerRolloutReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *NumaflowControllerRolloutReconciler) Recycle(ctx context.Context, _ ctlrcommon.RolloutObject, ...) (bool, error)
- func (r *NumaflowControllerRolloutReconciler) SetCurrentRiderList(ctx context.Context, rolloutObject ctlrcommon.RolloutObject, ...)
- func (r *NumaflowControllerRolloutReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *NumaflowControllerRolloutReconciler) SkipProgressiveAssessment(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject) (bool, progressive.SkipProgressiveAssessmentReason, error)
- func (r *NumaflowControllerRolloutReconciler) UpdateProgressiveMetrics(rolloutObject progressive.ProgressiveRolloutObject)
Constants ¶
const (
ControllerNumaflowControllerRollout = "numaflow-controller-rollout-controller"
)
Variables ¶
This section is empty.
Functions ¶
func DeriveControllerInstanceID ¶ added in v1.0.0
DeriveControllerInstanceID returns the instance ID for a trial NumaflowController child named childName ("<rolloutName>-<nameCount>") running version. The result is "<sanitized version>-<nameCount>", so a later trial of the same version, after a failed one was recycled, still gets a distinct instance. It returns "" when childName does not end in "-<number>": that is the name of the controller which predates Progressive, and it keeps its empty instance.
Types ¶
type NumaflowControllerRolloutReconciler ¶
type NumaflowControllerRolloutReconciler struct {
// contains filtered or unexported fields
}
NumaflowControllerRolloutReconciler reconciles a NumaflowControllerRollout object
func NewNumaflowControllerRolloutReconciler ¶
func NewNumaflowControllerRolloutReconciler( cli client.Client, scheme *k8sRuntime.Scheme, customMetrics *metrics.CustomMetrics, recorder record.EventRecorder, ) *NumaflowControllerRolloutReconciler
func (*NumaflowControllerRolloutReconciler) AssessResourceChain ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) AssessResourceChain( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, existingUpgradingChildDef *unstructured.Unstructured, ) (apiv1.AssessmentResult, []apiv1.ResourceChainMemberStatus, []string, error)
AssessResourceChain implements progressiveController. The trial controller is promoted only when it is healthy and every ISBServiceRollout, PipelineRollout, and MonoVertexRollout in the namespace has a successful resource assessment for its trial on this instance. Each member contributes its resource assessment, not its chain assessment, so a workload waiting on this controller does not make the controller wait on that workload's chain.
func (*NumaflowControllerRolloutReconciler) AssessUpgradingChild ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) AssessUpgradingChild( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, existingUpgradingChildDef *unstructured.Unstructured, assessmentSchedule config.AssessmentSchedule) (apiv1.AssessmentResult, string, error)
AssessUpgradingChild assesses the trial NumaflowController on its own. This implements a function of the progressiveController interface. The health check fails when assessmentSchedule.End passes, and a recorded success is not repeated. Promotion uses AssessResourceChain, which also requires the workloads running on this controller instance.
func (*NumaflowControllerRolloutReconciler) CheckForDifferences ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) CheckForDifferences( ctx context.Context, rolloutObject ctlrcommon.RolloutObject, numaflowControllerDef *unstructured.Unstructured, requiredSpec map[string]interface{}, requiredMetadata map[string]interface{}, existingChildUpgradeState common.UpgradeState) (bool, error)
CheckForDifferences checks to see if the NumaflowController definition matches the spec and the required metadata. spec.instanceID is excluded from the comparison: it is bound to a child when the child is created and is never part of what the Rollout defines, so two children of the same version on different instances are not different.
func (*NumaflowControllerRolloutReconciler) CheckForDifferencesWithRolloutDef ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) CheckForDifferencesWithRolloutDef( ctx context.Context, existingNumaflowController *unstructured.Unstructured, rolloutObject ctlrcommon.RolloutObject, existingChildUpgradeState common.UpgradeState) (bool, error)
CheckForDifferencesWithRolloutDef tests if there's a meaningful difference between an existing child and the child that would be produced by the Rollout definition. This implements a function of the progressiveController interface.
func (*NumaflowControllerRolloutReconciler) CreateUpgradingChildDefinition ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) CreateUpgradingChildDefinition(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, name string) (*unstructured.Unstructured, error)
CreateUpgradingChildDefinition creates a NumaflowController in an "upgrading" state with the given name This implements a function of the progressiveController interface
func (*NumaflowControllerRolloutReconciler) ErrorHandler ¶
func (r *NumaflowControllerRolloutReconciler) ErrorHandler(ctx context.Context, nfcRollout *apiv1.NumaflowControllerRollout, err error, reason, msg string)
func (*NumaflowControllerRolloutReconciler) GetChildTypeString ¶
func (r *NumaflowControllerRolloutReconciler) GetChildTypeString() string
GetChildTypeString is used for logging
func (*NumaflowControllerRolloutReconciler) GetDesiredRiders ¶ added in v0.22.0
func (r *NumaflowControllerRolloutReconciler) GetDesiredRiders(rolloutObject ctlrcommon.RolloutObject, childName string, child *unstructured.Unstructured) ([]riders.Rider, error)
GetDesiredRiders gets the list of Riders as specified in the RolloutObject; NumaflowControllerRollout has none
func (*NumaflowControllerRolloutReconciler) GetExistingRiders ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) GetExistingRiders(ctx context.Context, rolloutObject ctlrcommon.RolloutObject, upgrading bool) (unstructured.UnstructuredList, error)
GetExistingRiders gets the list of Riders that already exists; NumaflowControllerRollout has none
func (*NumaflowControllerRolloutReconciler) GetPipelineList ¶
func (r *NumaflowControllerRolloutReconciler) GetPipelineList(ctx context.Context, rolloutNamespace string, rolloutName string) (unstructured.UnstructuredList, error)
func (*NumaflowControllerRolloutReconciler) GetRolloutKey ¶
func (r *NumaflowControllerRolloutReconciler) GetRolloutKey(rolloutNamespace string, rolloutName string) string
func (*NumaflowControllerRolloutReconciler) GetTemplateArguments ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) GetTemplateArguments(child *unstructured.Unstructured) map[string]interface{}
GetTemplateArguments is the map of Arguments used for templating the child definition; NumaflowControllerRollout has no templated fields
func (*NumaflowControllerRolloutReconciler) IncrementChildCount ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) IncrementChildCount(ctx context.Context, rolloutObject ctlrcommon.RolloutObject) (int32, error)
IncrementChildCount updates the count of children for the Resource in Kubernetes and returns the index that should be used for the next child This implements a function of the RolloutController interface
func (*NumaflowControllerRolloutReconciler) MarkRolloutPaused ¶
func (*NumaflowControllerRolloutReconciler) ProcessPromotedChildPostFailure ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) ProcessPromotedChildPostFailure( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, promotedChildDef *unstructured.Unstructured, c client.Client, ) (bool, error)
func (*NumaflowControllerRolloutReconciler) ProcessPromotedChildPostUpgradeStart ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) ProcessPromotedChildPostUpgradeStart( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, promotedChildDef *unstructured.Unstructured, c client.Client, ) (bool, error)
func (*NumaflowControllerRolloutReconciler) ProcessPromotedChildPreUpgrade ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) ProcessPromotedChildPreUpgrade( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, promotedChildDef *unstructured.Unstructured, c client.Client, ) (bool, error)
func (*NumaflowControllerRolloutReconciler) ProcessUpgradingChildPostFailure ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) ProcessUpgradingChildPostFailure( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, upgradingChildDef *unstructured.Unstructured, c client.Client, ) (bool, error)
func (*NumaflowControllerRolloutReconciler) ProcessUpgradingChildPostUpgradeStart ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) ProcessUpgradingChildPostUpgradeStart( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, upgradingChildDef *unstructured.Unstructured, c client.Client, ) (bool, error)
func (*NumaflowControllerRolloutReconciler) ProcessUpgradingChildPreUpgrade ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) ProcessUpgradingChildPreUpgrade( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, upgradingChildDef *unstructured.Unstructured, c client.Client, ) (bool, error)
func (*NumaflowControllerRolloutReconciler) Reconcile ¶
func (r *NumaflowControllerRolloutReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.3/pkg/reconcile
func (*NumaflowControllerRolloutReconciler) Recycle ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) Recycle(ctx context.Context, _ ctlrcommon.RolloutObject, numaflowController *unstructured.Unstructured) (bool, error)
Recycle deletes the NumaflowController child and returns true when it was deleted. This implements a function of the RolloutController interface.
GarbageCollectChildren calls Recycle only for children it has already labeled recyclable. Recycle itself only looks at references: it deletes the child when both counts are zero.
spec.instanceID selects the instance. ISBServices and MonoVertices bound to it are counted separately, listed live since a deleted instance can't be brought back. Pipelines are covered by the ISBService count, since an ISBService remains while a Pipeline uses it. An empty instance ID is the original or adopted controller. Dependents with no controller-instance-id label and no Numaflow instance annotation are references to that instance. A child that never reaches zero references stays.
func (*NumaflowControllerRolloutReconciler) SetCurrentRiderList ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) SetCurrentRiderList(ctx context.Context, rolloutObject ctlrcommon.RolloutObject, riders []riders.Rider)
SetCurrentRiderList updates the list of Riders; NumaflowControllerRollout has none
func (*NumaflowControllerRolloutReconciler) SetupWithManager ¶
func (r *NumaflowControllerRolloutReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*NumaflowControllerRolloutReconciler) SkipProgressiveAssessment ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) SkipProgressiveAssessment(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject) (bool, progressive.SkipProgressiveAssessmentReason, error)
SkipProgressiveAssessment reports whether this controller's own health should be treated as Success. Progressive strategy forcePromote does that. The chain assessment still runs.
func (*NumaflowControllerRolloutReconciler) UpdateProgressiveMetrics ¶ added in v1.0.0
func (r *NumaflowControllerRolloutReconciler) UpdateProgressiveMetrics(rolloutObject progressive.ProgressiveRolloutObject)