diff --git a/components/envoy-configs/templates/httproute.yaml.tpl b/components/envoy-configs/templates/httproute.yaml.tpl index 4622a75d5..171a67983 100644 --- a/components/envoy-configs/templates/httproute.yaml.tpl +++ b/components/envoy-configs/templates/httproute.yaml.tpl @@ -41,6 +41,15 @@ spec: {{- end }} port: {{ .service.port }} {{- end }} + {{- if .timeouts }} + timeouts: + {{- if hasKey .timeouts "backendRequest" }} + backendRequest: {{ .timeouts.backendRequest | default "15s"}} + {{- end }} + {{- if hasKey .timeouts "request" }} + request: {{ .timeouts.request | default "15s"}} + {{- end }} + {{- end }} {{- if eq .service.backendType "tls" }} --- apiVersion: gateway.envoyproxy.io/v1alpha1 diff --git a/components/envoy-configs/values.schema.json b/components/envoy-configs/values.schema.json index f7bbc099d..f8ba86e76 100644 --- a/components/envoy-configs/values.schema.json +++ b/components/envoy-configs/values.schema.json @@ -105,7 +105,10 @@ "backendType": { "type": "string", "description": "Type of traffic that service expects - 'http' or 'tls'", - "enum": ["tls", "http"] + "enum": [ + "tls", + "http" + ] } }, "required": [ @@ -133,6 +136,20 @@ "filters": { "type": "object", "description": "Route filters." + }, + "timeouts": { + "type": "object", + "description": "Rule timeouts", + "properties": { + "request": { + "type": "string", + "description": "Request specifies the maximum duration for a gateway to respond to an HTTP request." + }, + "backendRequest": { + "type": "string", + "description": "BackendRequest specifies a timeout for an individual request from the gateway to a backend. This covers the time from when the request first starts being sent from the gateway to when the full response has been received from the backend." + } + } } }, "required": [