Documentation
¶
Index ¶
- Constants
- type PipelineRolloutReconciler
- func (r *PipelineRolloutReconciler) AssessUpgradingChild(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (apiv1.AssessmentResult, string, error)
- func (r *PipelineRolloutReconciler) CheckForDifferences(ctx context.Context, pipelineDef *unstructured.Unstructured, ...) (bool, error)
- func (r *PipelineRolloutReconciler) CheckForDifferencesWithRolloutDef(ctx context.Context, existingPipeline *unstructured.Unstructured, ...) (bool, error)
- func (r *PipelineRolloutReconciler) CreateUpgradingChildDefinition(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (*unstructured.Unstructured, error)
- func (r *PipelineRolloutReconciler) EnqueuePipeline(namespacedName k8stypes.NamespacedName)
- func (r *PipelineRolloutReconciler) ErrorHandler(ctx context.Context, pipelineRollout *apiv1.PipelineRollout, err error, ...)
- func (r *PipelineRolloutReconciler) GetDesiredRiders(rolloutObject ctlrcommon.RolloutObject, pipelineName string, ...) ([]riders.Rider, error)
- func (r *PipelineRolloutReconciler) GetExistingRiders(ctx context.Context, rolloutObject ctlrcommon.RolloutObject, upgrading bool) (unstructured.UnstructuredList, error)
- func (r *PipelineRolloutReconciler) GetTemplateArguments(pipeline *unstructured.Unstructured) map[string]interface{}
- func (r *PipelineRolloutReconciler) IncrementChildCount(ctx context.Context, rolloutObject ctlrcommon.RolloutObject) (int32, error)
- func (r *PipelineRolloutReconciler) ProcessPromotedChildPostFailure(ctx context.Context, pipelineRollout progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *PipelineRolloutReconciler) ProcessPromotedChildPostUpgrade(ctx context.Context, pipelineRollout progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *PipelineRolloutReconciler) ProcessPromotedChildPreUpgrade(ctx context.Context, pipelineRollout progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *PipelineRolloutReconciler) ProcessUpgradingChildPostFailure(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *PipelineRolloutReconciler) ProcessUpgradingChildPostSuccess(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) error
- func (r *PipelineRolloutReconciler) ProcessUpgradingChildPostUpgrade(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *PipelineRolloutReconciler) ProcessUpgradingChildPreUpgrade(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *PipelineRolloutReconciler) ProgressiveUnsupported(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject) bool
- func (r *PipelineRolloutReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *PipelineRolloutReconciler) Recycle(ctx context.Context, pipeline *unstructured.Unstructured, c client.Client) (bool, error)
- func (r *PipelineRolloutReconciler) SetCurrentRiderList(ctx context.Context, rolloutObject ctlrcommon.RolloutObject, ...)
- func (r *PipelineRolloutReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- func (r *PipelineRolloutReconciler) Shutdown(ctx context.Context)
Constants ¶
const (
ControllerPipelineRollout = "pipeline-rollout-controller"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PipelineRolloutReconciler ¶
type PipelineRolloutReconciler struct {
// Queue contains the list of PipelineRollouts that currently need to be reconciled
// both PipelineRolloutReconciler.Reconcile() and other Rollout reconcilers can add PipelineRollouts to this Queue to be processed as needed
// a set of Workers is used to process this Queue
Queue workqueue.TypedRateLimitingInterface[interface{}]
// contains filtered or unexported fields
}
PipelineRolloutReconciler reconciles a PipelineRollout object
var (
PipelineROReconciler *PipelineRolloutReconciler
)
func NewPipelineRolloutReconciler ¶
func NewPipelineRolloutReconciler( c client.Client, s *k8sRuntime.Scheme, customMetrics *metrics.CustomMetrics, recorder record.EventRecorder, ) *PipelineRolloutReconciler
func (*PipelineRolloutReconciler) AssessUpgradingChild ¶ added in v0.13.0
func (r *PipelineRolloutReconciler) AssessUpgradingChild( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, existingUpgradingChildDef *unstructured.Unstructured, assessmentSchedule config.AssessmentSchedule) (apiv1.AssessmentResult, string, error)
AssessUpgradingChild makes an assessment of the upgrading child to determine if it was successful, failed, or still not known This implements a function of the progressiveController interface
func (*PipelineRolloutReconciler) CheckForDifferences ¶ added in v0.24.0
func (r *PipelineRolloutReconciler) CheckForDifferences(ctx context.Context, pipelineDef *unstructured.Unstructured, requiredSpec map[string]interface{}, requiredMetadata map[string]interface{}) (bool, error)
CheckForDifferences checks to see if the pipeline definition matches the spec and the required metadata
func (*PipelineRolloutReconciler) CheckForDifferencesWithRolloutDef ¶ added in v0.28.0
func (r *PipelineRolloutReconciler) CheckForDifferencesWithRolloutDef(ctx context.Context, existingPipeline *unstructured.Unstructured, rolloutObject ctlrcommon.RolloutObject) (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 In order to do that, it must remove from the check any fields that are manipulated by Numaplane or Numaflow
func (*PipelineRolloutReconciler) CreateUpgradingChildDefinition ¶ added in v0.11.0
func (r *PipelineRolloutReconciler) CreateUpgradingChildDefinition(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, name string) (*unstructured.Unstructured, error)
CreateUpgradingChildDefinition creates a definition for an "upgrading" pipeline This implements a function of the progressiveController interface
func (*PipelineRolloutReconciler) EnqueuePipeline ¶
func (r *PipelineRolloutReconciler) EnqueuePipeline(namespacedName k8stypes.NamespacedName)
func (*PipelineRolloutReconciler) ErrorHandler ¶
func (r *PipelineRolloutReconciler) ErrorHandler(ctx context.Context, pipelineRollout *apiv1.PipelineRollout, err error, reason, msg string)
func (*PipelineRolloutReconciler) GetDesiredRiders ¶ added in v0.22.0
func (r *PipelineRolloutReconciler) GetDesiredRiders(rolloutObject ctlrcommon.RolloutObject, pipelineName string, pipelineDef *unstructured.Unstructured) ([]riders.Rider, error)
GetDesiredRiders gets the list of Riders as specified in the PipelineRollout, templated for the specific pipeline name and based on the pipeline definition. Note the pipelineName can be different from pipelineDef.GetName(). The pipelineName is what's used for templating the Rider definition, while the pipelineDef is really only used in the case of "per-vertex" Riders. In this case, it's necessary to use the existing pipeline's name to template in order to effectively compare whether the Rider has changed, but use the latest pipeline definition to derive the current list of Vertices that need Riders.
func (*PipelineRolloutReconciler) GetExistingRiders ¶ added in v0.22.0
func (r *PipelineRolloutReconciler) GetExistingRiders(ctx context.Context, rolloutObject ctlrcommon.RolloutObject, upgrading bool) (unstructured.UnstructuredList, error)
Get the Riders that have been deployed If "upgrading==true", return those which are associated with the Upgrading Pipeline; otherwise return those which are associated with the Promoted one
func (*PipelineRolloutReconciler) GetTemplateArguments ¶ added in v0.28.0
func (r *PipelineRolloutReconciler) GetTemplateArguments(pipeline *unstructured.Unstructured) map[string]interface{}
templates are used to dynamically evaluate child spec, metadata, as well as Riders
func (*PipelineRolloutReconciler) IncrementChildCount ¶
func (r *PipelineRolloutReconciler) IncrementChildCount(ctx context.Context, rolloutObject ctlrcommon.RolloutObject) (int32, error)
IncrementChildCount increments the child count for the Rollout and returns the count to use This implements a function of the RolloutController interface
func (*PipelineRolloutReconciler) ProcessPromotedChildPostFailure ¶ added in v0.14.0
func (r *PipelineRolloutReconciler) ProcessPromotedChildPostFailure( ctx context.Context, pipelineRollout progressive.ProgressiveRolloutObject, promotedPipelineDef *unstructured.Unstructured, c client.Client, ) (bool, error)
ProcessPromotedChildPostFailure handles the post-upgrade processing of the promoted pipeline after the "upgrading" pipeline has failed. It performs the following post-upgrade operations: - it restores the promoted pipeline vertices' scale values to the original values retrieved from the rollout status.
Parameters:
- ctx: the context for managing request-scoped values.
- pipelineRollout: the PipelineRollout instance
- promotedPipelineDef: the definition of the promoted pipeline as an unstructured object.
- c: the client used for interacting with the Kubernetes API.
Returns:
- A boolean indicating whether we should requeue.
- An error if any issues occur during processing.
func (*PipelineRolloutReconciler) ProcessPromotedChildPostUpgrade ¶ added in v0.13.0
func (r *PipelineRolloutReconciler) ProcessPromotedChildPostUpgrade( ctx context.Context, pipelineRollout progressive.ProgressiveRolloutObject, promotedPipelineDef *unstructured.Unstructured, c client.Client, ) (bool, error)
func (*PipelineRolloutReconciler) ProcessPromotedChildPreUpgrade ¶ added in v0.13.0
func (r *PipelineRolloutReconciler) ProcessPromotedChildPreUpgrade( ctx context.Context, pipelineRollout progressive.ProgressiveRolloutObject, promotedPipelineDef *unstructured.Unstructured, c client.Client, ) (bool, error)
ProcessPromotedChildPreUpgrade handles the pre-upgrade processing of a promoted pipeline. It performs the following pre-upgrade operations: - it calculates how to scale down the promoted pipeline vertices before proceeding with a progressive upgrade.
Parameters:
- ctx: the context for managing request-scoped values.
- pipelineRollout: the pipelineRollout
- promotedPipelineDef: the definition of the promoted pipeline as an unstructured object.
- c: the client used for interacting with the Kubernetes API.
Returns:
- A boolean indicating whether we should requeue.
- An error if any issues occur during processing.
func (*PipelineRolloutReconciler) ProcessUpgradingChildPostFailure ¶ added in v0.16.0
func (r *PipelineRolloutReconciler) ProcessUpgradingChildPostFailure( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, upgradingPipelineDef *unstructured.Unstructured, c client.Client, ) (bool, error)
func (*PipelineRolloutReconciler) ProcessUpgradingChildPostSuccess ¶ added in v0.17.0
func (r *PipelineRolloutReconciler) ProcessUpgradingChildPostSuccess( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, upgradingPipelineDef *unstructured.Unstructured, c client.Client, ) error
func (*PipelineRolloutReconciler) ProcessUpgradingChildPostUpgrade ¶ added in v0.19.0
func (r *PipelineRolloutReconciler) ProcessUpgradingChildPostUpgrade( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, upgradingPipelineDef *unstructured.Unstructured, c client.Client, ) (bool, error)
ProcessUpgradingChildPostUpgrade handles the processing of an upgrading pipeline definition after it's been created
Parameters:
- ctx: the context for managing request-scoped values.
- rolloutObject: the PipelineRollout instance
- upgradingPipelineDef: the definition of the upgrading pipeline as an unstructured object.
- c: the client used for interacting with the Kubernetes API.
Returns:
- A boolean indicating whether we should requeue.
- An error if any issues occur during processing.
func (*PipelineRolloutReconciler) ProcessUpgradingChildPreUpgrade ¶ added in v0.17.0
func (r *PipelineRolloutReconciler) ProcessUpgradingChildPreUpgrade( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, upgradingPipelineDef *unstructured.Unstructured, c client.Client, ) (bool, error)
ProcessUpgradingChildPreUpgrade handles the processing of an upgrading pipeline before it's been created It performs the following pre-upgrade operations: - it uses the promoted rollout status scale values to calculate the upgrading pipeline scale min and max for each vertex.
Parameters:
- ctx: the context for managing request-scoped values.
- rolloutObject: the PipelineRollout instance
- upgradingPipelineDef: the definition of the upgrading pipeline as an unstructured object.
- c: the client used for interacting with the Kubernetes API.
Returns:
- A boolean indicating whether we should requeue.
- An error if any issues occur during processing.
func (*PipelineRolloutReconciler) ProgressiveUnsupported ¶ added in v0.26.1
func (r *PipelineRolloutReconciler) ProgressiveUnsupported(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject) bool
func (*PipelineRolloutReconciler) Reconcile ¶
func (r *PipelineRolloutReconciler) 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 (*PipelineRolloutReconciler) Recycle ¶ added in v0.10.0
func (r *PipelineRolloutReconciler) Recycle( ctx context.Context, pipeline *unstructured.Unstructured, c client.Client, ) (bool, error)
Recycle deletes child; returns true if it was in fact deleted This implements a function of the RolloutController interface For Pipelines, for the Progressive case, we first drain the Pipeline here before we delete it. (For PPND case, it will have been drained prior to this function.) And if the Pipeline can't drain by itself (in the case it's unhealthy), we "force drain" it by applying a new spec over top it.
func (*PipelineRolloutReconciler) SetCurrentRiderList ¶ added in v0.22.0
func (r *PipelineRolloutReconciler) SetCurrentRiderList(ctx context.Context, rolloutObject ctlrcommon.RolloutObject, riders []riders.Rider)
update Status to reflect the current Riders (for promoted pipeline)
func (*PipelineRolloutReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
func (*PipelineRolloutReconciler) Shutdown ¶
func (r *PipelineRolloutReconciler) Shutdown(ctx context.Context)