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

Commit

Permalink
Fix recreating BucketAccess with Update method
Browse files Browse the repository at this point in the history
  • Loading branch information
kvaps committed Jul 31, 2024
1 parent 80979e8 commit d4fc96e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/bucketaccess/bucketaccess_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1.
if err != nil {
return bal.recordError(bucketAccess, v1.EventTypeWarning, events.FailedRevokeAccess, err)
}
} else {
// Trigger the Add logic to ensure that the BucketAccess is properly reconciled
err := bal.Add(ctx, bucketAccess)
if err != nil {
return bal.recordError(bucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err)
}
}

klog.V(3).InfoS("Update BucketAccess success",
Expand Down

0 comments on commit d4fc96e

Please sign in to comment.