Skip to content

Commit

Permalink
Rehome DefaultUpdateRetry from crossplane-runtime
Browse files Browse the repository at this point in the history
crossplane/crossplane-runtime#1

Per the above issue the util package is deprecated. As best I can tell the AKS
cluster controller is the only user of this retry setting, so suggest we move it
to where it's used.

Signed-off-by: Nic Cope <negz@rk0n.org>
  • Loading branch information
negz committed Jan 31, 2020
1 parent d55d46f commit 5aee6d4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/controller/compute/akscluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/meta"
"github.com/crossplaneio/crossplane-runtime/pkg/reconciler/managed"
"github.com/crossplaneio/crossplane-runtime/pkg/resource"
"github.com/crossplaneio/crossplane-runtime/pkg/util"

computev1alpha3 "github.com/crossplaneio/stack-azure/apis/compute/v1alpha3"
azurev1alpha3 "github.com/crossplaneio/stack-azure/apis/v1alpha3"
Expand Down Expand Up @@ -269,8 +268,14 @@ func (r *Reconciler) create(instance *computev1alpha3.AKSCluster, aksClient *com

instance.Status.SetConditions(runtimev1alpha1.ReconcileSuccess())

b := wait.Backoff{
Steps: 10,
Duration: 500 * time.Millisecond,
Factor: 1.0,
Jitter: 0.1,
}
// wait until the important status fields we just set have become committed/consistent
updateWaitErr := wait.ExponentialBackoff(util.DefaultUpdateRetry, func() (done bool, err error) {
updateWaitErr := wait.ExponentialBackoff(b, func() (done bool, err error) {
if err := r.Update(ctx, instance); err != nil {
return false, nil
}
Expand Down

0 comments on commit 5aee6d4

Please sign in to comment.