-
Notifications
You must be signed in to change notification settings - Fork 360
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
api: wasm extension #2877
api: wasm extension #2877
Conversation
1e38c46
to
23b312f
Compare
Hi @zhaohuabing . We had some initial discussion here: #2546 on extensibility. The discussion was leaning towards a more common interface for all data plane extensions (golang, wasm, lua, ext-proc). |
23b312f
to
7fc5ede
Compare
Also there is a proposal for containing all extensions by #2570, how do we deal with the relationship with that? BTW, I prefer wasm for a high level API, since it is frequently used for extensions. |
Which persona will be using this API? IMHO it's a bit dangerous to let application owners inject code into envoy, even if executed in isolation. If we see this as a policy for Gateway admins, should we support attachment to routes? |
My apologies @guydc , I haven't noticed the existing discussion and the draft PR and didn't mean to add a competing PR. :-) Before proposing the API, I considered two approaches to support data plane extensions (WASM, Lua, Golang, External Process, etc.)
The main problem of the first approach is that it would be difficult to support multiple extensions of the same type, e.g. users may need to define multiple WASM filters for different purposes for a single HTTPRoute. If we do support a list of each type of extensions in the fat EnvoyExtensionPolicy, that policy would become very large. |
It's common that there are multiple applications behind the gateway, and they may need different wasm extensions, just like the other policies. |
All good, I'm very happy that this topic is getting more attention and I hope that we can make this happen for v1.1.0.
I agree that different extensions do have different structures, interfaces, concerns and use patterns. Some support per-route config while other don't, some are more modular and may repeat multiple time in the FC, while others are external and more likely to only be called-out once in the filter chain. I'm very much open to different extension types being supported for different use cases if other maintainers also support this approach. |
Let's bring this to the EG meeting and discuss further. Even we option to have multiple extension types, these types do need to address the common concerns raised in #2570 to ensure cohensive approach.
|
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
c5f4203
to
071ecc5
Compare
071ecc5
to
98a36fb
Compare
6925691
to
a31cc00
Compare
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2877 +/- ##
=======================================
Coverage 64.50% 64.51%
=======================================
Files 121 121
Lines 21381 21388 +7
=======================================
+ Hits 13792 13798 +6
- Misses 6718 6720 +2
+ Partials 871 870 -1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
api/v1alpha1/wasm_types.go
Outdated
// +optional | ||
SHA256 *string `json:"sha256,omitempty"` | ||
// SHA256 *string `json:"sha256,omitempty"` |
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.
should remove it instead of comment.
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.
I leave this because it's likely to be used when implementing wasm extension.
Of course, I'll remove it if I find out it's not necessary when implementing it.
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
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.
thanks !
hey @zhaohuabing lets start off with |
* API for wasm extensions Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * fix lint Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * ues envoyextenstionpolicy Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * any.Any Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * order Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * change config to json string Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * change config to json string Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * fix lint Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * add sha256 checksum Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * fix gen Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * address comments Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * address comments Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * fix test Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * revert kube.mk Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com> * remove wasmextensionpolicies.yaml Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * address comments Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * remove sha256 for now Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * address comments Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * address comments Signed-off-by: huabing zhao <zhaohuabing@gmail.com> --------- Signed-off-by: huabing zhao <zhaohuabing@gmail.com> Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
This PR proposes an API for supporting Wasm plugins: