I’m trying to create a simple envoy filter with wasm (say, the dummy “add_header” filter that can be found all over the web). I’ve compiled a wasm file, added through a cm / volume, and configured pod annotations to mount it, so far so good.
When I create the EnvoyFilter however, I get this error:
Error adding/updating listener(s) virtualInbound: Unable to create Wasm HTTP filter
Running istioctl proxystatus
shows sync issue (status is “STALE (Never Acknowledged)”). The config diff shows huge part missing, basically all the “virtualInbound” listener, which seems to confirm the error message.
So, perhaps I have some mistake in my EnvoyFilter? Here it is:
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: ui-examplefilter
namespace: default
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
listener:
filterChain:
filter:
name: envoy.http_connection_manager
subFilter:
name: envoy.router
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
config:
config:
name: example-filter
rootId: add_header
configuration: "what ever you want"
vmConfig:
vmId: example-filter
runtime: envoy.wasm.runtime.v8
code:
local:
filename: /var/local/lib/wasm-filters/optimized.wasm
workloadSelector:
labels:
app: ui
version: base
Any idea?
I’ve also seen this bug report that perhaps is related: https://github.com/istio/istio/issues/24743 but still trying to get it work with no luck… any help appreciated!