Skip to content

Commit

Permalink
Fix error on CR deletion
Browse files Browse the repository at this point in the history
This closes #39, by returning nil instead of err
  • Loading branch information
xek authored and dmendiza committed Nov 6, 2023
1 parent 991a805 commit 9924389
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controllers/barbicanapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (r *BarbicanAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request)
if err != nil {
if k8s_errors.IsNotFound(err) {
// Object not found
return ctrl.Result{}, err
return ctrl.Result{}, nil
}
// Error reading the object - requeue the request.
return ctrl.Result{}, err
Expand Down
2 changes: 1 addition & 1 deletion controllers/barbicankeystonelistener_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (r *BarbicanKeystoneListenerReconciler) Reconcile(ctx context.Context, req
if err != nil {
if k8s_errors.IsNotFound(err) {
// Object not found
return ctrl.Result{}, err
return ctrl.Result{}, nil
}
// Error reading the object - requeue the request.
return ctrl.Result{}, err
Expand Down
3 changes: 2 additions & 1 deletion controllers/barbicanworker_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ func (r *BarbicanWorkerReconciler) Reconcile(ctx context.Context, req ctrl.Reque
err := r.Client.Get(ctx, req.NamespacedName, instance)
if err != nil {
if k8s_errors.IsNotFound(err) {
return ctrl.Result{}, err
// Object not found
return ctrl.Result{}, nil
}
// Error reading the object - requeue the request.
return ctrl.Result{}, err
Expand Down

0 comments on commit 9924389

Please sign in to comment.