plano/envoyfilter
Adil Hafeez dd8c43a392
improve cluster not configured error (#73)
* improve cluster not configured error

* dont panic

* update format

* Merge branch 'main' into adil/fix_salman_docs
2024-09-24 13:24:26 -07:00
..
grafana Add workflow logic for weather forecast demo (#24) 2024-07-30 16:23:23 -07:00
prometheus Add workflow logic for weather forecast demo (#24) 2024-07-30 16:23:23 -07:00
src improve cluster not configured error (#73) 2024-09-24 13:24:26 -07:00
tests improve response handling (#71) 2024-09-23 22:56:35 -07:00
build_filter.sh Add workflow logic for weather forecast demo (#24) 2024-07-30 16:23:23 -07:00
Cargo.lock add bolt guard config (#55) 2024-09-17 10:59:50 -07:00
Cargo.toml improve service names (#54) 2024-09-17 08:47:35 -07:00
docker-compose.yaml fix webui url and dependencies (#66) 2024-09-19 17:48:50 -07:00
Dockerfile Update Dockerfile 2024-09-19 20:06:38 -07:00
download_mistral_7b.sh Add support for local llm (mistral 7b) (#31) 2024-08-06 23:40:06 -07:00
envoy.template.yaml Add ability to define clusters in config (#61) 2024-09-18 20:03:26 -07:00
init_vector_store.sh add embedding store (#10) 2024-07-18 14:04:51 -07:00
katanemo-config.yaml remove embeddings config from config (#64) 2024-09-19 17:49:42 -07:00
README.md Add initial integration style tests (#20) 2024-07-25 14:41:36 -07:00

Envoy filter code for gateway

Add toolchain

$ rustup target add wasm32-wasi

Building

$ cargo build --target wasm32-wasi --release

Testing

$ cargo test

Using in Envoy

This example can be run with docker compose and has a matching Envoy configuration.

$ docker compose up

Examples

Direct response.

Send HTTP request to localhost:10000/hello:

$ curl localhost:10000/hello

Expected response:

HTTP/1.1 200 OK
content-length: 40
content-type: text/plain
custom-header: katanemo filter
date: Wed, 10 Jul 2024 16:59:43 GMT
server: envoy

Inline call.

Send HTTP request to localhost:10000/inline:

$ curl localhost:10000/hello
{
  "headers": {
    "Accept": "*/*",
    "Host": "localhost",
    "User-Agent": "curl/7.81.0",
    "X-Amzn-Trace-Id": "Root=1-637c4767-6e31776a0b407a0219b5b570",
    "X-Envoy-Expected-Rq-Timeout-Ms": "15000"
  }
}

Expected Envoy logs:

[...] wasm log http_auth_random: Access granted.