Documentation
¶
Index ¶
- Constants
- type MonoVertexRolloutReconciler
- func (r *MonoVertexRolloutReconciler) AssessUpgradingChild(ctx context.Context, existingUpgradingChildDef *unstructured.Unstructured) (apiv1.AssessmentResult, error)
- func (r *MonoVertexRolloutReconciler) ChildNeedsUpdating(ctx context.Context, from, to *unstructured.Unstructured) (bool, error)
- func (r *MonoVertexRolloutReconciler) CreateUpgradingChildDefinition(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (*unstructured.Unstructured, error)
- func (r *MonoVertexRolloutReconciler) ErrorHandler(monoVertexRollout *apiv1.MonoVertexRollout, err error, reason, msg string)
- func (r *MonoVertexRolloutReconciler) IncrementChildCount(ctx context.Context, rolloutObject ctlrcommon.RolloutObject) (int32, error)
- func (r *MonoVertexRolloutReconciler) ProcessPromotedChildPostFailure(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *MonoVertexRolloutReconciler) ProcessPromotedChildPreUpgrade(ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, ...) (bool, error)
- func (r *MonoVertexRolloutReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *MonoVertexRolloutReconciler) Recycle(ctx context.Context, monoVertexDef *unstructured.Unstructured, c client.Client) (bool, error)
- func (r *MonoVertexRolloutReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
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 *runtime.Scheme, customMetrics *metrics.CustomMetrics, recorder record.EventRecorder, ) *MonoVertexRolloutReconciler
func (*MonoVertexRolloutReconciler) AssessUpgradingChild ¶ added in v0.13.0
func (r *MonoVertexRolloutReconciler) 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 This implements a function of the progressiveController interface
func (*MonoVertexRolloutReconciler) ChildNeedsUpdating ¶
func (r *MonoVertexRolloutReconciler) 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 (*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(monoVertexRollout *apiv1.MonoVertexRollout, err error, reason, msg string)
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, promotedChildDef *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
- promotedChildDef: 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 (*MonoVertexRolloutReconciler) ProcessPromotedChildPreUpgrade ¶ added in v0.13.0
func (r *MonoVertexRolloutReconciler) ProcessPromotedChildPreUpgrade( ctx context.Context, rolloutObject progressive.ProgressiveRolloutObject, promotedChildDef *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 ensures that the promoted monovertex is scaled down before proceeding with a progressive upgrade.
Parameters:
- ctx: the context for managing request-scoped values.
- rolloutObject: the MonoVertexRollout instance
- promotedChildDef: 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 (*MonoVertexRolloutReconciler) Reconcile ¶
func (r *MonoVertexRolloutReconciler) 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 (*MonoVertexRolloutReconciler) Recycle ¶ added in v0.10.0
func (r *MonoVertexRolloutReconciler) Recycle(ctx context.Context, monoVertexDef *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
func (*MonoVertexRolloutReconciler) SetupWithManager ¶
func (r *MonoVertexRolloutReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.