Skip to content

Commit

Permalink
test 4
Browse files Browse the repository at this point in the history
  • Loading branch information
nolancon committed Dec 16, 2024
1 parent fba868a commit e1d960c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/controller/bucket/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,11 @@ func (c *external) updateBucketCR(ctx context.Context, bucket *v1alpha1.Bucket,
}

updateRequired := cb(bucketDeepCopy, bucket)
updatedBucketCopy := bucket.DeepCopy()
switch updateRequired {
case NeedsStatusUpdate:
return c.kubeClient.Status().Patch(ctx, updatedBucketCopy, client.MergeFrom(bucketDeepCopy))
return c.kubeClient.Status().Patch(ctx, bucket, client.MergeFrom(bucketDeepCopy))
case NeedsObjectUpdate:
return c.kubeClient.Patch(ctx, updatedBucketCopy, client.MergeFrom(bucketDeepCopy))
return c.kubeClient.Patch(ctx, bucket, client.MergeFrom(bucketDeepCopy))
default:
return nil
}
Expand Down

0 comments on commit e1d960c

Please sign in to comment.