Skip to content

WebAssembly for Proxies examples for use with Istio

License

Notifications You must be signed in to change notification settings

esnible/wasm-examples

Repository files navigation

Sample WebAssembly filters for Istio

These examples should work with Istio 1.8, 1.9, and future 1.10 (current master). These examples are contributed as a companion to my IstioCon talk, Extending Envoy with WASM from start to finish.

All of these examples can be tested without any 3rd party tools or cloud-specific Kubernetes storage. Users might get better performance using another technique or using the Wasm Remote Fetch experimental feature launched with Istio 1.9. The ConfigMap approach is used here because it is the simplest.

These filters for have been tested with the C++, AssemblyScript, and Go WebAssembly for Proxies SDKs.

I am preparing to contribute these with an Apache license to one of the existing examples repos in the istio-ecosystem org.

Preparing the language SDKs

To prepare the WebAssembly for Proxies C++ SDK:

git clone git@github.com:proxy-wasm/proxy-wasm-cpp-sdk.git
cd proxy-wasm-cpp-sdk
# The next line takes 30+ minutes on MacBook (64 GB, 2.3 GHz 8-Core Intel Core i9)
docker build -t wasmsdk:v2 -f Dockerfile-sdk .

regex path replacer

The regexp replacer example shows how to redirect the HTTP path of incoming requests to a server.

sequence number

The sequence number example shows how to used “shared data” to coordinate multiple instances of a filter.

http-call

The HTTP call example shows how to make outgoing HTTP calls, and modify the body of responses based on the results of that call. .

About

WebAssembly for Proxies examples for use with Istio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published