pipelinerollout

package
v0.14.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
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 *runtime.Scheme,
	customMetrics *metrics.CustomMetrics,
	recorder record.EventRecorder,
) *PipelineRolloutReconciler

func (*PipelineRolloutReconciler) AssessUpgradingChild added in v0.13.0

func (r *PipelineRolloutReconciler) AssessUpgradingChild(ctx context.Context, existingUpgradingChildDef *unstructured.Unstructured) (apiv1.AssessmentResult, error)

AssessUpgradingChild makes an assessment of the upgrading child 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 This implements a function of the progressiveController interface

func (*PipelineRolloutReconciler) ChildNeedsUpdating

func (r *PipelineRolloutReconciler) ChildNeedsUpdating(ctx context.Context, from, to *unstructured.Unstructured) (bool, error)

ChildNeedsUpdating() tests for essential equality, with any irrelevant fields eliminated from the comparison This implements a function of the progressiveController interface

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(pipelineRollout *apiv1.PipelineRollout, err error, reason, msg string)

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" child has failed. It performs the following post-upgrade operations: - it restores the promoted pipeline source 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 child 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) 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 ensures that the promoted pipeline source vertices are scaled down before proceeding with a progressive upgrade.

Parameters:

  • ctx: the context for managing request-scoped values.
  • pipelineRollout: the pipelineRollout
  • promotedPipelineDef: the definition of the promoted child 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) SetupWithManager

func (r *PipelineRolloutReconciler) SetupWithManager(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