-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Enhance wasm plugins #10829
Enhance wasm plugins #10829
Conversation
421a482
to
21c5a6c
Compare
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
Co-authored-by: Kevin Pollet <pollet.kevin@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.
LGTM
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.
LGTM
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
Environment variables to forward to the wasm guest. | ||
|
||
`--experimental.localplugins.<name>.settings.mounts`: | ||
Directory to mount to the wasm guest. |
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 wonder if we should specify the syntax for this as IMHO it is very counter intuitive.
@@ -473,14 +473,26 @@ | |||
[experimental.plugins.Descriptor0] | |||
moduleName = "foobar" | |||
version = "foobar" | |||
[experimental.plugins.Descriptor0.settings] | |||
envs = ["foobar", "foobar"] |
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.
shall we include more realistic values for this?
Hello all, It seems that the problem persists in 3.1 Extracted from my docker compose networks: And here is my dynamic configuration http: The include fails 2024-11-12T18:15:26Z DBG github.com/traefik/traefik/v3/pkg/logs/wasm.go:31 > Initializing WAF with CRS embedded and directives: Thanks for you help! |
Hello @tiangao88, Thanks for reporting this! Could you please open a dedicated issue? |
Related jcchavezs/coraza-http-wasm#17 |
What does this PR do?
This PR enhance the wasm plugins mechanism by adding:
GOOS=wasip1
GOARCH=wasm
).http-wasm-host
part.wasip1
implementation and the WasmEdge socket extension (only if sockets were detected to avoid breaking changes). WARNING this doesn't work on Windows.mounts
(shared directory) andenvs
(shared environment variables) for wasm plugin./etc:/etc
works but not/tmp/etc:/etc
)Motivation
As describe in #10801 , it allows more powerful wasm plugin.
More
You can find an plugin example here: https://github.com/traefik/plugindemowasm-http-call
- [ ] Added/updated tests- [ ] Added/updated documentationAdditional Notes
Co-authored-by: Michael <michael.matur@gmail.com>