Skip to content

feat: use filter_chain to avoid listener drain for per route lua.#9383

Draft
zirain wants to merge 9 commits into
envoyproxy:mainfrom
zirain:per-route-lua-filters
Draft

feat: use filter_chain to avoid listener drain for per route lua.#9383
zirain wants to merge 9 commits into
envoyproxy:mainfrom
zirain:per-route-lua-filters

Conversation

@zirain

@zirain zirain commented Jul 1, 2026

Copy link
Copy Markdown
Member

Follow up #9368, use filter_chain filter to avoid listener drain.

zirain added 9 commits June 29, 2026 14:40
- Added a Luas field to the listener-level EnvoyExtensions struct so listener-scoped Lua policies can be represented separately from per-route ones.
- Refactored to add HCM placeholder filters for both per-route Lua slots and listener-level Lua filters (using named Lua HCM filters with empty default source). Listener filters are appended after route-slot filters to preserve ordering after HCM filter reversal. The Disabled: true flag was removed from listener Lua HCM filters since they are always active for the listener.
- New implementation that injects listener-level Lua source code and filter context into RouteConfiguration.TypedPerFilterConfig, delivering script changes via RDS to avoid listener drains.

Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
…on-Lua policy

Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit c8d0be5
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a4481880382c00008be4f56
😎 Deploy Preview https://deploy-preview-9383--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@zirain zirain changed the title Per route lua filters feat: use filter_chain to avoid listener drain for per route lua. Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.76796% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.25%. Comparing base (59a0cab) to head (c8d0be5).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/xds/translator/lua.go 78.50% 13 Missing and 10 partials ⚠️
internal/gatewayapi/envoyextensionpolicy.go 76.47% 2 Missing and 2 partials ⚠️
internal/xds/translator/httpfilters.go 55.55% 2 Missing and 2 partials ⚠️
internal/xds/translator/translator.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9383      +/-   ##
==========================================
+ Coverage   75.19%   75.25%   +0.05%     
==========================================
  Files         252      252              
  Lines       41049    41229     +180     
==========================================
+ Hits        30868    31025     +157     
- Misses       8085     8093       +8     
- Partials     2096     2111      +15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant