Skip to content

Commit db43420

Browse files
Merge pull request #316 from umangachapagain/fix-obc-updates
DFBUGS-2276: ensure OBC spec is not reset unexpectedly
2 parents 94438ac + 51cf947 commit db43420

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

controllers/utils/s3.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ func CreateOrUpdateObjectBucketClaim(ctx context.Context, c client.Client, bucke
5858
}
5959

6060
operationResult, err := controllerutil.CreateOrUpdate(ctx, c, noobaaOBC, func() error {
61-
noobaaOBC.Spec = obv1alpha1.ObjectBucketClaimSpec{
62-
BucketName: bucketName,
63-
StorageClassName: fmt.Sprintf("%s.noobaa.io", bucketNamespace),
64-
}
61+
noobaaOBC.Spec.BucketName = bucketName
62+
noobaaOBC.Spec.StorageClassName = fmt.Sprintf("%s.noobaa.io", bucketNamespace)
6563

6664
if noobaaOBC.Annotations == nil {
6765
noobaaOBC.Annotations = annotations

0 commit comments

Comments
 (0)