@@ -269,7 +269,7 @@ func addRemoteBucket(ctx context.Context, client MinioAdmin, params models.Creat
269
269
return bucketARN , err
270
270
}
271
271
272
- func addBucketReplicationItem (ctx context.Context , session * models.Principal , minClient minioClient , bucketName , prefix , arn , destinationBucket string , repDelMark , repDels , repMeta bool , tags string ) error {
272
+ func addBucketReplicationItem (ctx context.Context , session * models.Principal , minClient minioClient , bucketName , prefix , destinationARN string , repDelMark , repDels , repMeta bool , tags string ) error {
273
273
// we will tolerate this call failing
274
274
cfg , err := minClient .getBucketReplication (ctx , bucketName )
275
275
if err != nil {
@@ -310,15 +310,15 @@ func addBucketReplicationItem(ctx context.Context, session *models.Principal, mi
310
310
}
311
311
312
312
opts := replication.Options {
313
- RoleArn : arn ,
314
- Priority : fmt . Sprintf ( "%d" , maxPrio ) ,
315
- RuleStatus : "enable" ,
316
- DestBucket : destinationBucket ,
317
- Op : replication . AddOption ,
318
- TagString : tags ,
319
- ReplicateDeleteMarkers : repDelMarkStatus ,
320
- ReplicateDeletes : repDelsStatus ,
321
- ReplicaSync : repMetaStatus ,
313
+ Priority : fmt . Sprintf ( "%d" , maxPrio ) ,
314
+ RuleStatus : "enable" ,
315
+ DestBucket : destinationARN ,
316
+ Op : replication . AddOption ,
317
+ TagString : tags ,
318
+ ExistingObjectReplicate : "enable" , // enabled by default
319
+ ReplicateDeleteMarkers : repDelMarkStatus ,
320
+ ReplicateDeletes : repDelsStatus ,
321
+ ReplicaSync : repMetaStatus ,
322
322
}
323
323
324
324
err2 := mcClient .setReplication (ctx , & cfg , opts )
@@ -363,7 +363,6 @@ func setMultiBucketReplication(ctx context.Context, session *models.Principal, c
363
363
sourceBucket ,
364
364
params .Body .Prefix ,
365
365
arn ,
366
- targetBucket ,
367
366
params .Body .ReplicateDeleteMarkers ,
368
367
params .Body .ReplicateDeletes ,
369
368
params .Body .ReplicateMetadata ,
0 commit comments