gloo icon indicating copy to clipboard operation
gloo copied to clipboard

allow adding arbitrary filters in Proxy

Open stevenctl opened this issue 1 year ago • 0 comments

Description

Gloo uses WellKnownFilterStage internally to determine the ordering of Envoy config generated by plugins. It’s exposed in ExtProc API as FilterStage which may be inserted at varying stages. Building on top of this system, we can add a list of staged filters directly on the TCPListenerOptions and HTTPListenerOptions

API changes

  • Created CustomEnvoyFilter
  • Added list of CustomEnvoyFilter to TCPListenerOptions (for network filters)
  • Added two lists of CustomEnvoyFilter to `HTTPListenerOptions (for both http and network filters)

Code changes

  • Add a NetworkFilterPlugin+HTTPFilterPlugin that blindly converts these from our proto into StagedFilters

Docs changes

  • Generated proto docs changes
  • Updated README to account for y behavior
  • ...

Testing steps

TODO!

Notes for reviewers

Should we gate this with some Settings or an env variable? It's a pretty dangerous API for users to directly interact with.

Checklist:

  • [X] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [X] I have made corresponding changes to the documentation
  • [ ] I have added tests that prove my fix is effective or that my feature works

stevenctl avatar Jun 26 '24 18:06 stevenctl