pipelinerollout

package
v0.24.4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerPipelineRollout = "pipeline-rollout-controller"

	TemplatePipelineName      = ".pipeline-name"
	TemplateVertexName        = ".vertex-name"
	TemplatePipelineNamespace = ".pipeline-namespace"
)

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, from, to *unstructured.Unstructured) (bool, error)

CheckForDifferences() tests for essential equality. This implements a function of the progressiveController interface, used to determine if a previously Upgrading Pipeline should be replaced with a new one. What should a user be able to update to cause this?: Ideally, they should be able to change any field if they need to and not just those that are configured as "progressive", in the off chance that changing one of those fixes a problem. However, we need to exclude any field that Numaplane or another platform changes, or it will confuse things.

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) 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) ProcessPromotedChildPreRecycle added in v0.23.0

func (r *PipelineRolloutReconciler) ProcessPromotedChildPreRecycle(
	ctx context.Context,
	pipelineRollout progressive.ProgressiveRolloutObject,
	promotedPipelineDef *unstructured.Unstructured,
	c client.Client,
) error

ProcessPromotedChildPreRecycle processes the Promoted child directly prior to it being recycled (due to being replaced by a new Promoted child)

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) ProcessUpgradingChildPreRecycle added in v0.23.0

func (r *PipelineRolloutReconciler) ProcessUpgradingChildPreRecycle(
	ctx context.Context,
	rolloutObject progressive.ProgressiveRolloutObject,
	upgradingPipelineDef *unstructured.Unstructured,
	c client.Client,
) error

ProcessUpgradingChildPreRecycle processes the Upgrading child directly prior to it being recycled (due to being replaced by a new Upgrading child)

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) Reconcile

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

Recycle deletes child; returns true if it was in fact deleted This implements a function of the RolloutController interface

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

func (r *PipelineRolloutReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*PipelineRolloutReconciler) Shutdown

func (r *PipelineRolloutReconciler) Shutdown(ctx context.Context)

Jump to

Keyboard shortcuts

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