Comments (5)
even if this function is added, Envoy/Istio has no way to report back to the users. Plus this seems essentially the same as the return value from the existing proxy_on_configure
ABI. I suggest instead we just instantiate plugins at the control plane layer, and see the return value from proxy_on_configure
from spec.
from spec.
The original ABI had a function exactly like that, and Proxy-Wasm C++ SDK still has it (see: proxy_validate_configuration, RootContext::validateConfiguration), but I'm not aware of any plugins using it.
Note there are a few problems with such approach:
proxy_validate_configuration
might be only slightly different fromproxy_on_configure(configuration)
, which can result in code duplication and both functions could easily get out-of-sync over time,- some plugins require access to runtime variables (e.g. environment variables or host metadata), which control plane might not know about,
- some plugins fetch parts of configuration from remote HTTP/gRPC endpoints at startup.
Basically, proxy_validate_configuration
might catch some errors (e.g. parsing), but it cannot catch all of them, and it could introduce false negatives, so it's not a replacement for the proper solution (i.e. Envoy rejecting the configuration, and Istio propagating this information back to the operator).
from spec.
Another consideration here is that we access to those content types that
are being inspected and only buffer when inspection.
Could you elaborate? I don't understand how this is related to control plane performing config validation.
from spec.
proxy_validate_configuration might be only slightly different from proxy_on_configure(configuration), which can result in code duplication and both functions could easily get out-of-sync over time
Agree and I think the main difference between the two is the output but functionality wise they are quite similar.
some plugins require access to runtime variables (e.g. environment variables or host metadata), which control plane might not know about,some plugins fetch parts of configuration from remote HTTP/gRPC endpoints at startup.
Agree, this is mainly a best effort to allow users to validate the config offline.
So providing the method in the wasm extension isn't a perfect solution it just guarantees cohesion meaning that the same wasm that is running in prod is the one validating the config as opposed to provide another wasm (to be able to load it in different languages) or per language libraries (mostly limited to the wasm extension language)
from spec.
Related Issues (20)
- ABI to customize upstream/origin selection HOT 2
- Add documentation about exported WASI functions
- Can the same sandbox instance be shared with the same extension (such as Filter) ? HOT 10
- Reading host's env variables from Wasm VMs HOT 8
- chore: support to fetch the remote ip address in WASM
- Contribute the host implementation of Golang HOT 4
- How can a module signal unexpected failure? HOT 2
- The spec should define semantics and values for proxy_result_t HOT 4
- Is it suitable to add a link to our wasm-nginx-module? HOT 4
- Is the num_headers argument in used?
- Are there any plans to use c# to write plug-ins? HOT 4
- Is the reading host env function workable with istio-proxy? HOT 2
- Support for writing for WASM for UDP
- Add the host function for removing shared data HOT 1
- Link to ATS proxy-wasm plugin
- Inconsistency between the spec and implementation. HOT 2
- How to start a proxy-wasm-XXLang-sdk from scratch? HOT 1
- Properly document v0.2.1 ABI HOT 16
- where is the spec? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spec.