-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement “REPLACE" operation in the Envoyfilter API #27425
Comments
Add a "REPLACE" operation for EnvoyFilter patch. This operation only supports Network filter and HTTP filter. This is the implementation of issue istio#27425 Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
* Implement REPLACE operation for EnvoyFilter patch Add a "REPLACE" operation for EnvoyFilter patch. This operation only supports Network filter and HTTP filter. This is the implementation of issue #27425 Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * address comments Add debug info when no matching filter found. Add negative test. Change test case name to indicate http filter. Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * lint Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Add a "REPLACE" operation for EnvoyFilter patch. This operation only supports Network filter and HTTP filter. This is the implementation of issue istio#27425 Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
@zhaohuabing What's the background of implementing Replace? Especially only for |
@hzxuzhonghu The original reason is the one in the description of this issue: We want to use EnvoyFIlter API to add a Redis Proxy network filter in the listener, but it conflicts with the existing TCP proxy. Adding a "REPLACE" operation in the Envoyfilter API would solve this problem. Basically, sometimes we need to replace the TCP proxy in the listener with a more specific filter that can understand layer-7 traffic. |
Yeah, i understand it. What i am confused is can |
The semantic of "Remove & Add" is not exactly the same as "Replace", because order matters in a filter chain. |
Got it, how about InsertBefore/After |
Might work. But then the "Replace" logic would depend on other filters in the filter chain. I prefer "Replace" because it‘s more elegant. Is there any reason we want to eliminate the "Replace" operation? |
Currently, Aeraki is heavily using "Replace" operation to replace the default TCP filter with protocol-specific filters to support other layer-7 protocols in Istio. |
Not eliminate, just to be clear about the use case |
@hzxuzhonghu replace is a cleaner version of merge, when you do not want merge semantics. Add-remove makes you handle handling, but replace does not. |
Describe the feature request
We want to use EnvoyFIlter API to add a Redis Proxy network filter in the listener, but it conflicts with the existing TCP proxy. Adding a "REPLACE" operation in the Envoyfilter API would solve this problem.
We can't use the Istio build-in Redis xDS implementation because it's too simple to support our Redis use case such as read policy and mirroring.
Describe alternatives you've considered
[ ] Docs
[ ] Installation
[*] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Additional context
The text was updated successfully, but these errors were encountered: