-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(syncer): refine transform function (#606)
## What type of PR is this? /kind refactor ## What this PR does / why we need it: The current transform function has two capabilities: trimming to save informer memory and influencing data stored in ES. This PR splits these two capabilities into two stages, making the function definition clearer and having the following advantages: 1. The first stage uses jsonPath instead of go template, which is easier for users to use and less prone to errors, and ensures that the data in the informer is a subset of the original object. 2. The second stage can use workqueue to retry retryable errors that occur during the transformation process. ## Which issue(s) this PR fixes: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* --> Fixes #
- Loading branch information
1 parent
6514721
commit f4c389a
Showing
36 changed files
with
2,791 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
pkg/kubernetes/apis/search/v1beta1/zz_generated.conversion.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
103 changes: 103 additions & 0 deletions
103
pkg/kubernetes/apis/search/v1beta1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.