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

Commit f34ef08

Browse files
committed
Fix recreating Bucket with Update method
Signed-off-by: Andrei Kvapil <[email protected]>
1 parent c8d8efb commit f34ef08

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: pkg/imported-sidecar/pkg/bucket/bucket_controller.go

+6
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket)
222222
if err = b.handleDeletion(ctx, bucket); err != nil {
223223
return err
224224
}
225+
} else {
226+
// Trigger the Add logic to ensure that the Bucket is properly reconciled
227+
err := b.Add(ctx, bucket)
228+
if err != nil {
229+
return b.recordError(bucket, v1.EventTypeWarning, events.FailedGrantAccess, err)
230+
}
225231
}
226232

227233
klog.V(3).InfoS("Update Bucket success",

0 commit comments

Comments
 (0)