Skip to content

Commit

Permalink
Update documentation for Finalizers to return an explicit error (#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
weters authored and Tom Peters committed Feb 5, 2019
1 parent e1b192a commit 0f0fc77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/book/beyond_basics/using_finalizers.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err
if !containsString(instance.ObjectMeta.Finalizers, myFinalizerName) {
instance.ObjectMeta.Finalizers = append(instance.ObjectMeta.Finalizers, myFinalizerName)
if err := r.Update(context.Background(), instance); err != nil {
return reconcile.Result{Requeue: true}, nil
return reconcile.Result{}, err
}
}
} else {
Expand All @@ -55,7 +55,7 @@ func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err
// remove our finalizer from the list and update it.
instance.ObjectMeta.Finalizers = removeString(instance.ObjectMeta.Finalizers, myFinalizerName)
if err := r.Update(context.Background(), instance); err != nil {
return reconcile.Result{Requeue: true}, nil
return reconcile.Result{}, err
}
}

Expand Down

0 comments on commit 0f0fc77

Please sign in to comment.