Skip to content

Commit d330dfe

Browse files
committed
fix: error being silenced during apply
Signed-off-by: Tianpeng Wang <tpwang@alauda.io>
1 parent 1017ef8 commit d330dfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/reconciler/reconciler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,13 +556,13 @@ type ControllerSetupFunc func(c ControllerSetup) error
556556
// - Deployed - a release for this CR is deployed (but not necessarily ready).
557557
// - ReleaseFailed - an installation or upgrade failed.
558558
// - Irreconcilable - an error occurred during reconciliation
559-
func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
559+
func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error) {
560560
log := r.log.WithValues(strings.ToLower(r.gvk.Kind), req.NamespacedName)
561561
log.V(1).Info("Reconciliation triggered")
562562

563563
obj := &unstructured.Unstructured{}
564564
obj.SetGroupVersionKind(*r.gvk)
565-
err := r.client.Get(ctx, req.NamespacedName, obj)
565+
err = r.client.Get(ctx, req.NamespacedName, obj)
566566
if apierrors.IsNotFound(err) {
567567
log.V(1).Info("Resource %s/%s not found, nothing to do", req.NamespacedName.Namespace, req.NamespacedName.Name)
568568
return ctrl.Result{}, nil

0 commit comments

Comments
 (0)