Revert "Migrate backup sync controller from code-generator to kubebui… #4457
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…lder (#4423)"
This reverts commit 5aaeb3e.
Thank you for contributing to Velero!
Please add a summary of your change
This commit is used to revert #4423.
After #4423 is merged, we found backup sync controller is not expected to work as a list-watch way. Before refactor, backup sync controller actually works as an time-routine job, which is implemented by velero generic controller as an goroutine sleeps by the resyncPeriod then runs the resyncFunc.
The refactor code uses Reconcile to watch Backup CR as event trigger to backup sync.
Actually, the backup sync task should work, but the sync process will be trigger every time a backup has some change. So there is behavior difference.
In the future, I think the time-base sync process can be replaced by Reconcile way. The controller can sync just the changed backup in the Reconcile function, instead of whole backups in cluster. This is a more Kubernetes or event-driven way.
The advantages are:
But due to the coming FC date, revert first, then doing the job in future release is more reasonable.
Does your change fix a particular issue?
Fixes #(issue)
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.