apiVersion: networking.istio.io/v1alpha3 kind: EnvoyFilter metadata: name: golang-filter spec: workloadSelector: labels: app: httpbin configPatches: # The first patch adds the lua filter to the listener/http connection manager - applyTo: HTTP_FILTER match: context: SIDECAR_INBOUND listener: filterChain: filter: name: envoy.http_connection_manager subFilter: name: envoy.router patch: operation: INSERT_BEFORE value: # lua filter specification name: envoy.filters.http.wasm typed_config: '@type': type.googleapis.com/udpa.type.v1.TypedStruct type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm value: config: vm_config: code: local: filename: /var/local/wasm/http-filter.wasm runtime: envoy.wasm.runtime.v8