monovertexrollout

package
v0.28.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ControllerMonoVertexRollout = "monovertex-rollout-controller"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MonoVertexRolloutReconciler

type MonoVertexRolloutReconciler struct {
	// contains filtered or unexported fields
}

MonoVertexRolloutReconciler reconciles a MonoVertexRollout object

func NewMonoVertexRolloutReconciler

func NewMonoVertexRolloutReconciler(
	c client.Client,
	s *k8sRuntime.Scheme,
	customMetrics *metrics.CustomMetrics,
	recorder record.EventRecorder,
) *MonoVertexRolloutReconciler

func (*MonoVertexRolloutReconciler) AssessUpgradingChild added in v0.13.0

func (r *MonoVertexRolloutReconciler) 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 (*MonoVertexRolloutReconciler) CheckForDifferences added in v0.24.0

func (r *MonoVertexRolloutReconciler) CheckForDifferences(ctx context.Context, monoVertexDef *unstructured.Unstructured, requiredSpec map[string]interface{}, requiredMetadata map[string]interface{}) (bool, error)

CheckForDifferences checks to see if the monovertex definition matches the spec and the required metadata

func (*MonoVertexRolloutReconciler) CheckForDifferencesWithRolloutDef added in v0.28.0

func (r *MonoVertexRolloutReconciler) CheckForDifferencesWithRolloutDef(ctx context.Context, existingMonoVertex *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 (*MonoVertexRolloutReconciler) CreateUpgradingChildDefinition added in v0.11.0

func (r *MonoVertexRolloutReconciler) CreateUpgradingChildDefinition(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, name string) (*unstructured.Unstructured, error)

CreateUpgradingChildDefinition creates a definition for an "upgrading" monovertex This implements a function of the progressiveController interface

func (*MonoVertexRolloutReconciler) ErrorHandler

func (r *MonoVertexRolloutReconciler) ErrorHandler(ctx context.Context, monoVertexRollout *apiv1.MonoVertexRollout, err error, reason, msg string)

func (*MonoVertexRolloutReconciler) GetDesiredRiders added in v0.22.0

func (r *MonoVertexRolloutReconciler) GetDesiredRiders(rolloutObject ctlrcommon.RolloutObject, monoVertexName string, monoVertexDef *unstructured.Unstructured) ([]riders.Rider, error)

Get the list of Riders that we need based on what's defined in the MonoVertexRollout, templated according to the monoVertex child's name (monoVertexDef is not used and comes from the RolloutController interface)

func (*MonoVertexRolloutReconciler) GetExistingRiders added in v0.22.0

func (r *MonoVertexRolloutReconciler) 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 MonoVertex; otherwise return those which are associated with the Promoted one

func (*MonoVertexRolloutReconciler) GetTemplateArguments added in v0.28.0

func (r *MonoVertexRolloutReconciler) GetTemplateArguments(monovertex *unstructured.Unstructured) map[string]interface{}

templates are used to dynamically evaluate child spec, metadata, as well as Riders

func (*MonoVertexRolloutReconciler) IncrementChildCount

func (r *MonoVertexRolloutReconciler) 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 (*MonoVertexRolloutReconciler) ProcessPromotedChildPostFailure added in v0.14.0

func (r *MonoVertexRolloutReconciler) ProcessPromotedChildPostFailure(
	ctx context.Context,
	rolloutObject progressive.ProgressiveRolloutObject,
	promotedMonoVertexDef *unstructured.Unstructured,
	c client.Client,
) (bool, error)

ProcessPromotedChildPostFailure andles the post-upgrade processing of the promoted monovertex after the "upgrading" child has failed. It performs the following post-upgrade operations: - it restores the promoted monovertex scale values to the original values retrieved from the rollout status.

Parameters:

  • ctx: the context for managing request-scoped values.
  • rolloutObject: the MonoVertexRollout instance
  • promotedMonoVertexDef: the definition of the promoted monovertex 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 (*MonoVertexRolloutReconciler) ProcessPromotedChildPostUpgrade added in v0.13.0

func (r *MonoVertexRolloutReconciler) ProcessPromotedChildPostUpgrade(
	ctx context.Context,
	rolloutObject progressive.ProgressiveRolloutObject,
	promotedMonoVertexDef *unstructured.Unstructured,
	c client.Client,
) (bool, error)

func (*MonoVertexRolloutReconciler) ProcessPromotedChildPreUpgrade added in v0.13.0

func (r *MonoVertexRolloutReconciler) ProcessPromotedChildPreUpgrade(
	ctx context.Context,
	rolloutObject progressive.ProgressiveRolloutObject,
	promotedMonoVertexDef *unstructured.Unstructured,
	c client.Client,
) (bool, error)

ProcessPromotedChildPreUpgrade handles the pre-upgrade processing of a promoted monovertex. It performs the following pre-upgrade operations: - it calculates how to scale down the promoted monovertex before proceeding with a progressive upgrade.

Parameters:

  • ctx: the context for managing request-scoped values.
  • rolloutObject: the MonoVertexRollout instance
  • promotedMonoVertexDef: the definition of the promoted monovertex 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 (*MonoVertexRolloutReconciler) ProcessUpgradingChildPostFailure added in v0.16.0

func (r *MonoVertexRolloutReconciler) ProcessUpgradingChildPostFailure(
	ctx context.Context,
	rolloutObject progressive.ProgressiveRolloutObject,
	upgradingMonoVertexDef *unstructured.Unstructured,
	c client.Client,
) (bool, error)

ProcessUpgradingChildPostFailure handles the failure of an upgrading monovertex (anything specific to MonoVertex) It performs the following post-failure operations: - it scales down the upgrading monovertex to 0 pods if it's not already

Parameters:

  • ctx: the context for managing request-scoped values.
  • rolloutObject: the MonoVertexRollout instance
  • upgradingMonoVertexDef: the definition of the existing upgrading monovertex from the beginning of reconciliation
  • 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 (*MonoVertexRolloutReconciler) ProcessUpgradingChildPostSuccess added in v0.17.0

func (r *MonoVertexRolloutReconciler) ProcessUpgradingChildPostSuccess(
	ctx context.Context,
	rolloutObject progressive.ProgressiveRolloutObject,
	upgradingMonoVertexDef *unstructured.Unstructured,
	c client.Client,
) error

ProcessUpgradingChildPostSuccess handles an upgrading monovertex that has been deemed successful to be promoted. It performs the following post-success operations: - it scales up the monovertex back to the original scale.min and scale.max

Parameters:

  • ctx: the context for managing request-scoped values.
  • rolloutObject: the MonoVertexRollout instance
  • upgradingMonoVertexDef: the definition of the existing upgrading monovertex from the beginning of reconciliation
  • c: the client used for interacting with the Kubernetes API.

Returns:

  • An error if any issues occur during processing.

func (*MonoVertexRolloutReconciler) ProcessUpgradingChildPostUpgrade added in v0.19.0

func (r *MonoVertexRolloutReconciler) ProcessUpgradingChildPostUpgrade(
	ctx context.Context,
	rolloutObject progressive.ProgressiveRolloutObject,
	upgradingMonoVertexDef *unstructured.Unstructured,
	c client.Client,
) (bool, error)

ProcessUpgradingChildPostUpgrade handles the processing of an upgrading monovertex definition after it's been created

Parameters:

  • ctx: the context for managing request-scoped values.
  • rolloutObject: the MonoVertexRollout instance
  • upgradingMonoVertexDef: the definition of the upgrading monovertex 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 (*MonoVertexRolloutReconciler) ProcessUpgradingChildPreUpgrade added in v0.17.0

func (r *MonoVertexRolloutReconciler) ProcessUpgradingChildPreUpgrade(
	ctx context.Context,
	rolloutObject progressive.ProgressiveRolloutObject,
	upgradingMonoVertexDef *unstructured.Unstructured,
	c client.Client,
) (bool, error)

ProcessUpgradingChildPreUpgrade handles the processing of an upgrading monovertex definition before it's been created It performs the following pre-upgrade operations: - it uses the promoted rollout status scale values to calculate the upgrading monovertex scale min and max.

Parameters:

  • ctx: the context for managing request-scoped values.
  • rolloutObject: the MonoVertexRollout instance
  • upgradingMonoVertexDef: the definition of the upgrading monovertex 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 (*MonoVertexRolloutReconciler) ProgressiveUnsupported added in v0.26.1

func (r *MonoVertexRolloutReconciler) ProgressiveUnsupported(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject) bool

func (*MonoVertexRolloutReconciler) 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 (*MonoVertexRolloutReconciler) 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 (*MonoVertexRolloutReconciler) SetCurrentRiderList added in v0.22.0

func (r *MonoVertexRolloutReconciler) SetCurrentRiderList(
	ctx context.Context,
	rolloutObject ctlrcommon.RolloutObject,
	riders []riders.Rider)

update Status to reflect the current Riders (for promoted monovertex)

func (*MonoVertexRolloutReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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