-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
dynamic_modules: scaffolds config API & HTTP Filter #36448
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
/retest |
cc @marc-barry ps the flaky CI failure is nothing to do with this PR
|
envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1; | ||
|
||
// The name for this filter configuration. This can be used to distinguish between different filter implementations | ||
// inside a dynamic module. For example, a module can have completely different filter implementations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this level of indirection useful? Why not just have multiple modules in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is that each module must have its own copy of language runtime which is an unnecessary overhead (~a few MB) in the memory space as well as some languages do not support multiple language runtime existence in one process such as Go.
// For example, if a module has two filter implementations, one for logging and one for header manipulation, | ||
// filter_name is used to choose either logging or header manipulation. The filter_config can be used to | ||
// configure the logging level or the header manipulation behavior. | ||
string filter_config = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a string instead of a google.protobuf.Any
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good q and this choice of string is intentional - this config will go across the C ABI boundary as-is, hence we need a plain binary representation, otherwise this will end up forcing all dynamic modules to be able to understand protobuf which is unnecessary. For example, each module would need a copy of protobuf dependency.
api/envoy/extensions/filters/http/dynamic_modules/v3/dynamic_modules.proto
Show resolved
Hide resolved
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Commit Message: dynamic_modules: scaffolds config API & HTTP Filter
Additional Description:
This scaffolds the configuration API marked as work-in-progress, and
the skeleton HTTP filter implementation based on the configuration.
The real implementations will follow after this commit.
Risk Level: low
Testing: done
Docs Changes: n/a
Release Notes: n/a (not enabled yet)
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]