I am trying to set an outbound call timeout. (My current calls are timing out.)
I found this example that seems to do it, but the example given is in a non-longer valid syntax. Here is what it looks like:
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: nginx-lua-filter
namespace: nginx-ingress
spec:
filters:
- filterConfig:
inlineCode: |
function envoy_on_request(request_handle)
request_handle:headers():add("x-envoy-upstream-rq-timeout-ms", "120000")
end
filterName: envoy.lua
filterType: HTTP
listenerMatch:
listenerType: SIDECAR_OUTBOUND
workloadLabels:
app: nginx-ingress
In trying to convert this to current syntax, these are my guesses:
- Work Load
workloadLabels:
app: nginx-ingress
Should now be
workloadSelector:
labels:
app: nginx-ingress
-
Filter Type
I think thatfilterType: HTTP
is what is now- applyTo: HTTP_FILTER
-
Listener Type
I think thatlistenerType: SIDECAR_OUTBOUND
is now thecontext: SIDECAR_OUTBOUND
undermatch:
But I am unsure how to build in the rest. This is my best attempt:
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: istio-outbound-traffic-timeout
namespace: devunstable-framework-logging
spec:
workloadSelector:
labels:
app: logging-service-devunstable-team1
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_OUTBOUND
patch:
operation: INSERT_BEFORE
value:
name: envoy.lua
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
inlineCode: |
function envoy_on_request(request_handle)
request_handle:headers():add("x-envoy-upstream-rq-timeout-ms", "600000")
end
But it does not work. In fact, when I try to load the service normally it fails.
How do I convert this timout extension EnvoyFilter to the current syntax of an EnvoyFilter?