Skip to content

Commit

Permalink
test 5
Browse files Browse the repository at this point in the history
  • Loading branch information
nolancon committed Dec 16, 2024
1 parent e1d960c commit 1149646
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/controller/bucket/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 1149646

Please sign in to comment.