Full config applied to inbound and outbound of specific service
This timeout configuration will be applied to all inbound connections to frontend
and outbound connections from frontend
to backend
service
Configuration
apiVersion: kuma.io/v1alpha1
kind: MeshTimeout
metadata:
name: inbound-timeout
namespace: kuma-demo
labels:
kuma.io/mesh: default
spec:
targetRef:
kind: MeshSubset
tags:
app: frontend
from:
- targetRef:
kind: Mesh
default:
idleTimeout: 60s
connectionTimeout: 2s
http:
requestTimeout: 10s
streamIdleTimeout: 1h
maxStreamDuration: 30m
maxConnectionDuration: 30m
to:
- targetRef:
kind: MeshService
name: backend_kuma-demo_svc_3001
default:
idleTimeout: 60s
connectionTimeout: 1s
http:
requestTimeout: 5s
streamIdleTimeout: 1h
maxStreamDuration: 30m
maxConnectionDuration: 30m
apiVersion: kuma.io/v1alpha1
kind: MeshTimeout
metadata:
name: inbound-timeout
namespace: kuma-demo
labels:
kuma.io/mesh: default
spec:
targetRef:
kind: MeshSubset
tags:
app: frontend
from:
- targetRef:
kind: Mesh
default:
idleTimeout: 60s
connectionTimeout: 2s
http:
requestTimeout: 10s
streamIdleTimeout: 1h
maxStreamDuration: 30m
maxConnectionDuration: 30m
to:
- targetRef:
kind: MeshService
name: backend
namespace: kuma-demo
sectionName: http
default:
idleTimeout: 60s
connectionTimeout: 1s
http:
requestTimeout: 5s
streamIdleTimeout: 1h
maxStreamDuration: 30m
maxConnectionDuration: 30m
type: MeshTimeout
name: inbound-timeout
mesh: default
spec:
targetRef:
kind: MeshSubset
tags:
app: frontend
from:
- targetRef:
kind: Mesh
default:
idleTimeout: 60s
connectionTimeout: 2s
http:
requestTimeout: 10s
streamIdleTimeout: 1h
maxStreamDuration: 30m
maxConnectionDuration: 30m
to:
- targetRef:
kind: MeshService
name: backend
default:
idleTimeout: 60s
connectionTimeout: 1s
http:
requestTimeout: 5s
streamIdleTimeout: 1h
maxStreamDuration: 30m
maxConnectionDuration: 30m
type: MeshTimeout
name: inbound-timeout
mesh: default
spec:
targetRef:
kind: MeshSubset
tags:
app: frontend
from:
- targetRef:
kind: Mesh
default:
idleTimeout: 60s
connectionTimeout: 2s
http:
requestTimeout: 10s
streamIdleTimeout: 1h
maxStreamDuration: 30m
maxConnectionDuration: 30m
to:
- targetRef:
kind: MeshService
name: backend
sectionName: http
default:
idleTimeout: 60s
connectionTimeout: 1s
http:
requestTimeout: 5s
streamIdleTimeout: 1h
maxStreamDuration: 30m
maxConnectionDuration: 30m
Please adjust konnect_mesh_control_plane.my_meshcontrolplane.id and konnect_mesh.my_mesh.name according to your current configuration.
resource "konnect_mesh_timeout" "inbound_timeout" {
provider = konnect-beta
type = "MeshTimeout"
name = "inbound-timeout"
spec = {
target_ref = {
kind = "MeshSubset"
tags = {
app = "frontend"
}
}
from = [
{
target_ref = {
kind = "Mesh"
}
default = {
idle_timeout = "60s"
connection_timeout = "2s"
http = {
request_timeout = "10s"
stream_idle_timeout = "1h"
max_stream_duration = "30m"
max_connection_duration = "30m"
}
}
}
]
to = [
{
target_ref = {
kind = "MeshService"
name = "backend"
section_name = "http"
}
default = {
idle_timeout = "60s"
connection_timeout = "1s"
http = {
request_timeout = "5s"
stream_idle_timeout = "1h"
max_stream_duration = "30m"
max_connection_duration = "30m"
}
}
}
]
}
labels = {
"kuma.io/mesh" = konnect_mesh.my_mesh.name
}
cp_id = konnect_mesh_control_plane.my_meshcontrolplane.id
mesh = konnect_mesh.my_mesh.name
}