christian-posta / wasme

Wasme - the tool for building, pushing, pulling, and deploying Envoy Web Assembly Filters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repo contains the tooling that allows you to build and push WASM envoy filters, so they will be accessible to gloo.

To do so, first build the tool

go build .

The build the example filter (mostly copied from the envoy-wasm):

(cd example; bazel build :filter.wasm :filter_proto)

Push:

./wasme push gcr.io/solo-public/example-filter:v1 example/bazel-bin/filter.wasm example/bazel-bin/filter_proto-descriptor-set.proto.bin

load in to gloo:

kubectl edit -n gloo-system gateways.gateway.solo.io.v2 gateway-proxy-v2

set the httpGateway field like so:

  httpGateway:
    plugins:
      extensions:
        configs:
          wasm:
            config: yuval
            image: gcr.io/solo-public/example-filter:v1
            name: yuval
            root_id: add_header_root_id
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
  name: default
  namespace: gloo-system
spec:
  virtualHost:
    domains:
    - '*'
    routes:
    - matcher:
        exact: /sample-route-1
      routeAction:
        single:
          upstream:
            name: default-petstore-8080
            namespace: gloo-system
      routePlugins:
        prefixRewrite:
          prefixRewrite: /api/pets

emscripten sdk

If you change the emscripten SDK, an sdk with PR merged is needed: https://github.com/emscripten-core/emscripten/pull/9812/files

About

Wasme - the tool for building, pushing, pulling, and deploying Envoy Web Assembly Filters


Languages

Language:Go 72.2%Language:Rust 13.8%Language:Python 6.4%Language:C++ 2.7%Language:Makefile 2.6%Language:Shell 2.2%Language:Dockerfile 0.1%