Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 1829a9e

Browse files
committed
Fix recreating BucketAccess with Update method
Signed-off-by: Andrei Kvapil <[email protected]>
1 parent 330903d commit 1829a9e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/imported-sidecar/pkg/bucket/bucket_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,12 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke
297297
return err
298298
}
299299
}
300+
} else {
301+
// Trigger the Add logic to ensure that the BucketAccess is properly reconciled
302+
err := bal.Add(ctx, bucketAccess)
303+
if err != nil {
304+
return bal.recordError(bucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err)
305+
}
300306
}
301307

302308
return nil

0 commit comments

Comments
 (0)