BBR pluggable framework proposal#1964
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @davidbreitgand. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
4ffe090 to
af49267
Compare
af49267 to
377259c
Compare
cd109fd to
9b24a69
Compare
|
@srampal , @elevran , @nirrozenbaum could you please review? Initial implementation: PR 1981 will be refactored into a series of smaller PRs to fit the phased scope of the proposal. |
| const ( | ||
| //A deafult plugin implementation of this plugin type will always be configured for request plugins chain | ||
| //Even though BBRPlugin type is not (yet) a K8s resource, it's logically akin to `kind` | ||
| //MUST start wit an upper case letter, use CamelNotation, only aplhanumericals after the first letter |
There was a problem hiding this comment.
| //MUST start wit an upper case letter, use CamelNotation, only aplhanumericals after the first letter | |
| // MUST start with an upper case letter, use CamelNotation, only aplhanumericals after the first letter |
| The pluggable framework will be implemented iteratively over several phases. | ||
|
|
||
| 1. Introduce `BBRPlugin` `MetadataExtractor`, interface, registry, plugins chain, sample plugin implementation (`SimpleModelExtraction`) and its factory. Plugin configuration will be implemented via environment variables set in helm chart | ||
| 1. Introduce a second plugin interface, `ModelSelector` and sample plugin implementation |
There was a problem hiding this comment.
Q: for the initial task (various ways to do body based routing), a ModelSelector interface would have been sufficient. Why do we need multiple interfaces and what's the delta between interface in (1) and in (2)?
|
|
||
| 1. Introduce `BBRPlugin` `MetadataExtractor`, interface, registry, plugins chain, sample plugin implementation (`SimpleModelExtraction`) and its factory. Plugin configuration will be implemented via environment variables set in helm chart | ||
| 1. Introduce a second plugin interface, `ModelSelector` and sample plugin implementation | ||
| 1. Introduce shared struct (shared among the plugins of a plugins chain) |
There was a problem hiding this comment.
ModelSelector is aimed at semantic model selection rather than simple metadata extraction and putting it on the headers.
There was a problem hiding this comment.
The question was about the introduction of a shared struct. What's its use?
srampal
left a comment
There was a problem hiding this comment.
Some initial comments for now. Review is ongoing so maybe more to come.
1395c8c to
c4f9775
Compare
|
Hi @nirrozenbaum 👋 |
c4f9775 to
663ccb4
Compare
663ccb4 to
3e004a7
Compare
|
/ok-to-test |
| // A plugin implementation of "semantic-model-selector" sets X-Gateway-Model-Name to any valid | ||
| // model name from the inventory of the backend models and also mutates the body accordingly | ||
|
|
||
| Execute(requestBodyBytes []byte) (headers map[string]string, mutatedBodyBytes []byte, err error) |
There was a problem hiding this comment.
This plugin essentially encapsulates any logic the BBR would do right?
|
What is the status of this proposal? |
|
@nirrozenbaum what is the status of this proposal? |
I think we can close it, bbr is now pluggable. the goals stated in the proposal were achieved but the implementation is different than what’s described here (some principles are aligned partially) |
|
@ahg-g on second thought, I'm going to re-open and merge this PR. and later to update the proposal with its current state. I think it would be useful to have the proposal documented moving forward. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidbreitgand, nirrozenbaum The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1963This is a design proposal PR, it does not introduce code changes.
Does this PR introduce a user-facing change?: