Hello,
I have been using this yaml to try to create lua filter on istio 1.4.5.
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: lua-filter
namespace: foo
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.lua
typed_config:
"@type": "type.googleapis.com/envoy.config.filter.http.lua.v2.Lua"
inlineCode: |
function envoy_on_request(request_handle)
request_handle:headers():replace("lua-filter", "lua-filter")
end
EOF
Currently I am getting this error:
Error from server: error when creating “STDIN”: admission webhook “pilot.validation.istio.io” denied the request: configuration is invalid: envoy filter: unknown message type “envoy.config.filter.http.lua.v2.Lua”
Can you anyone help me understand what is happening?