-
Notifications
You must be signed in to change notification settings - Fork 28
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
Reading host's env variables from Wasm VMs #19
Comments
and do you have plan to support in https://github.com/proxy-wasm/proxy-wasm-rust-sdk ? |
@xuecanlong |
@mathetake |
Note that there is really nothing for the Proxy-Wasm spec to define here (well, other than saying that it's allowed, see: #17), since reading environment variables is already defined in the WASI spec. This actually already works in the Rust SDK (if you compile it for the @mathetake if you want to add a key-value map of the variables to export from Envoy, feel free to do it. But this has to be an explicit map (possibly with pass-through for configured values) and not a complete pass-through to the host variables. |
OK, will do. Thanks for clarification here! |
Created the issue in Envoy side: envoyproxy/envoy#14958. Please refer there for those who are interested in this feature. |
@mathetake I am very interested on this reading host env feature. So I just reviewed all issues and PR around this topic. But still not very clear about how to use it in real case. Could you give some tips? Such as how to config it in envoy.yaml and how to write the code in the wasm filter in C++?
in my wasm-filter.cc
Unluckily, I got nothing output. So anywrong I did on this? Bwt, is the function support by istio-envoy? and which should the istio version to be at least? Looking forward for your help, thanks in advance. |
@linzg2002, it seems to be used like this:
|
Actually, there's a need for reading envs from Plugins as you can see issues below:
We should have a consensus on how to deal with it, like,
this is somewhat related to #17 since this would be implemented as WASI's
environ_get
.The text was updated successfully, but these errors were encountered: