Hi,
I followed the examples at Istio / Envoy Filter and created a few test services. I can add a custom header to my incoming request, but I cannot find the envoy log. I checked the ingress gateway pod and the istiod pod.
I checked bot Istio and Envoy proxy’s documentation, but nowhere mentioned where I can see the logs.
My EnvoyFilter looks like this:
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: add-header
spec:
workloadSelector:
labels:
app: echoserver
configPatches:
# The first patch adds the lua filter to the listener/http connection manager
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
listener:
portNumber: 80
filterChain:
filter:
name: "envoy.filters.network.http_connection_manager"
subFilter:
name: "envoy.filters.http.router"
patch:
operation: INSERT_BEFORE
value: # lua filter specification
name: envoy.filters.http.lua
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua"
inlineCode: |
function envoy_on_request(request_handle)
request_handle:logInfo("hello envoy")
request_handle:headers():add("x-envoy-filter", "yoyo")
end
Thanks.