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:
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.
The second stage can use workqueue to retry retryable errors that occur during the transformation process.
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:
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.
The second stage can use workqueue to retry retryable errors that occur during the transformation process.
Which issue(s) this PR fixes:
Fixes #