From 4cdf742808c72666621b175b8a31b7b4dba09682 Mon Sep 17 00:00:00 2001 From: nolancon Date: Tue, 17 Dec 2024 11:52:03 +0000 Subject: [PATCH] remove nn --- internal/controller/bucket/helpers.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/controller/bucket/helpers.go b/internal/controller/bucket/helpers.go index e0a63e2c..838385a2 100644 --- a/internal/controller/bucket/helpers.go +++ b/internal/controller/bucket/helpers.go @@ -240,11 +240,9 @@ func (c *external) updateBucketCR(ctx context.Context, bucket *v1alpha1.Bucket, ctx, span := otel.Tracer("").Start(ctx, "bucket.external.updateBucketCR") defer span.End() - nn := types.NamespacedName{Name: bucket.GetName()} - for _, cb := range callbacks { err := retry.OnError(retry.DefaultRetry, resource.IsAPIError, func() error { - if err := c.kubeClient.Get(ctx, nn, bucket); err != nil { + if err := c.kubeClient.Get(ctx, types.NamespacedName{Name: bucket.GetName()}, bucket); err != nil { return err } switch cb(bucket) {