-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Envoy WASM singleton service per envoy instance #15860
Comments
That's not the way to configure a bootstrap extension, you need something like this: admin:
access_log_path: /dev/null
address:
socket_address:
address: 0.0.0.0
port_value: 9000
bootstrap_extensions:
- name: envoy.bootstrap.wasm
typed_config:
'@type': type.googleapis.com/envoy.extensions.wasm.v3.WasmService
singleton: true
config:
vm_config:
runtime: "envoy.wasm.runtime.v8"
code:
local:
filename: "/usr/local/bin/singleton_service.wasm"
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 9095 |
@PiotrSikora Thank you. I think the docs for that relevant section has not been updated yet. |
@NomadXD patches welcome! |
@PiotrSikora Sure. Would like to contribute. Any specific procedure that I have to follow before sending a PR for the docs ? |
No, simply update If you want more about contributing to Envoy in general, there is CONTRIBUTING.md file that you could read. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
Fixed in #15914. |
Title: Envoy WASM singleton service per envoy instance
Description:
I have a requirement where I have to make a HTTP request to an external service and pull some data periodically. I implemented a HTTP filter in Rust and doing the HTTP call from the
onTick
in theRootContext
. ButRootContext
gets created for each worker thread and for each worker thread , a HTTP occur. In the docs, there is an option for aSingleton
service where I have to specifysingleton: true
. https://www.envoyproxy.io/docs/envoy/latest/configuration/other_features/wasm_service#config-wasm-service. However the config example is not very descriptive.Configured as follows as mentioned in the docs. But envoy rejects the config at start up saying
error initializing configuration '/etc/envoy/envoy.yaml': Protobuf message (type envoy.config.bootstrap.v3.Bootstrap reason INVALID_ARGUMENT:wasm: Cannot find field.) has unknown fields
. Envoy version used in 1.17.1The text was updated successfully, but these errors were encountered: