From 1149646c2ca417d5cc9409c1899f0a6da57af507 Mon Sep 17 00:00:00 2001 From: nolancon Date: Mon, 16 Dec 2024 11:05:47 -0500 Subject: [PATCH] test 5 --- internal/controller/bucket/helpers.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/controller/bucket/helpers.go b/internal/controller/bucket/helpers.go index 31c395a7..33c2c68c 100644 --- a/internal/controller/bucket/helpers.go +++ b/internal/controller/bucket/helpers.go @@ -274,13 +274,13 @@ func (c *external) updateBucketCR(ctx context.Context, bucket *v1alpha1.Bucket, if err := c.kubeClient.Get(ctx, nn, bucket); err != nil { return err } - + newCopy := bucket.DeepCopy() updateRequired := cb(bucketDeepCopy, bucket) switch updateRequired { case NeedsStatusUpdate: - return c.kubeClient.Status().Patch(ctx, bucket, client.MergeFrom(bucketDeepCopy)) + return c.kubeClient.Status().Patch(ctx, bucket, client.MergeFrom(newCopy)) case NeedsObjectUpdate: - return c.kubeClient.Patch(ctx, bucket, client.MergeFrom(bucketDeepCopy)) + return c.kubeClient.Patch(ctx, bucket, client.MergeFrom(newCopy)) default: return nil }