Remove owner ref from synced backups
This was causing backups to be deleted by the k8s because the owner,
which is the backup schedule, won't be present on remote cluster
@@ -137,6 +137,7 @@ func (b *BackupSyncController) syncBackupsFromLocation(location *storkv1.BackupL
backupInfo.UID = ""
backupInfo.ResourceVersion = ""
backupInfo.SelfLink = ""
+ backupInfo.OwnerReferences = nil
backupInfo.Spec.ReclaimPolicy = storkv1.ApplicationBackupReclaimPolicyRetain
_, err = k8s.Instance().CreateApplicationBackup(&backupInfo)
if err != nil {
