func()

in internal/controller/appdeployment_controller.go [69:89]


func (r *AppDeploymentReconciler) ReconcileHandler(ctx context.Context, h handler.AppDeploymentHandlerInterface) (ctrl.Result, error) {
	operations := []reconciler.ReconcileOperation{
		h.EnsureApplicationValid,
		h.EnsureFinalizer,
		h.EnsureFinalizerDeleted,
		h.EnsureDependenciesReady,
		h.EnsureDeployingFinished,
		h.EnsureTeardownFinished,
	}

	for _, operation := range operations {
		operationResult, err := operation(ctx)
		if err != nil || operationResult.RequeueRequest {
			return ctrl.Result{RequeueAfter: operationResult.RequeueDelay}, err
		}
		if operationResult.CancelRequest {
			return ctrl.Result{}, nil
		}
	}
	return ctrl.Result{}, nil
}