forked from nephio-project/porch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PackageVariant: Use the default exponential back-off in case of error…
…s, instead of a fix 30 sec retry
- Loading branch information
Showing
1 changed file
with
2 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ import ( | |
"fmt" | ||
"strconv" | ||
"strings" | ||
"time" | ||
|
||
porchapi "github.com/nephio-project/porch/api/porch/v1alpha1" | ||
configapi "github.com/nephio-project/porch/api/porchconfig/v1alpha1" | ||
|
@@ -59,8 +58,6 @@ const ( | |
|
||
ConditionTypeStalled = "Stalled" // whether or not the packagevariant object is making progress or not | ||
ConditionTypeReady = "Ready" // whether or notthe reconciliation succeded | ||
|
||
requeueDuration = 30 * time.Second | ||
) | ||
|
||
//go:generate go run sigs.k8s.io/controller-tools/cmd/[email protected] rbac:headerFile=../../../../../scripts/boilerplate.yaml.txt,roleName=porch-controllers-packagevariants webhook paths="." output:rbac:artifacts:config=../../../config/rbac | ||
|
@@ -129,7 +126,7 @@ func (r *PackageVariantReconciler) Reconcile(ctx context.Context, req ctrl.Reque | |
if err != nil { | ||
setStalledConditionsToTrue(pv, err.Error()) | ||
// requeue, as the upstream may appear | ||
return ctrl.Result{RequeueAfter: requeueDuration}, err | ||
return ctrl.Result{}, err | ||
} | ||
meta.SetStatusCondition(&pv.Status.Conditions, metav1.Condition{ | ||
Type: ConditionTypeStalled, | ||
|
@@ -147,7 +144,7 @@ func (r *PackageVariantReconciler) Reconcile(ctx context.Context, req ctrl.Reque | |
Message: err.Error(), | ||
}) | ||
// requeue; it may be an intermittent error | ||
return ctrl.Result{RequeueAfter: requeueDuration}, nil | ||
return ctrl.Result{}, err | ||
} | ||
|
||
setTargetStatusConditions(pv, targets) | ||
|