Skip to content

Commit

Permalink
Merge pull request #591 from weters/book-finalizers-590
Browse files Browse the repository at this point in the history
#590 - Update documentation for Finalizers to return an explicit error
  • Loading branch information
k8s-ci-robot authored Feb 5, 2019
2 parents e1b192a + 0f0fc77 commit a36c521
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 a36c521

Please sign in to comment.