Replace a field with a JSON patch
Replace streamIdleTimeout on the inbound HTTP connection manager with a JSON patch. For this timeout, prefer MeshTimeout, which exposes streamIdleTimeout directly.
Configuration
apiVersion: kuma.io/v1alpha1
kind: MeshProxyPatch
metadata:
name: backend-stream-idle-timeout
namespace: kong-mesh-demo
labels:
kuma.io/mesh: default
spec:
targetRef:
kind: Dataplane
labels:
app: backend
default:
appendModifications:
- networkFilter:
operation: Patch
match:
name: envoy.filters.network.http_connection_manager
origin: inbound
jsonPatches:
- op: replace
path: "/streamIdleTimeout"
value: 15sCopied!
type: MeshProxyPatch
name: backend-stream-idle-timeout
mesh: default
spec:
targetRef:
kind: Dataplane
labels:
app: backend
default:
appendModifications:
- networkFilter:
operation: Patch
match:
name: envoy.filters.network.http_connection_manager
origin: inbound
jsonPatches:
- op: replace
path: "/streamIdleTimeout"
value: 15sCopied!
Adjust konnect_mesh_control_plane.my_meshcontrolplane.id and konnect_mesh.my_mesh.name according to your current configuration.
resource "konnect_mesh_proxy_patch" "backend_stream_idle_timeout" {
provider = konnect-beta
type = "MeshProxyPatch"
name = "backend-stream-idle-timeout"
spec = {
target_ref = {
kind = "Dataplane"
labels = {
app = "backend"
}
}
default = {
append_modifications = [
{
network_filter = {
operation = "Patch"
match = {
name = "envoy.filters.network.http_connection_manager"
origin = "inbound"
}
json_patches = [
{
op = "replace"
path = "/streamIdleTimeout"
value = "\"15s\""
}
]
}
}
]
}
}
labels = {
"kuma.io/mesh" = konnect_mesh.my_mesh.name
}
cp_id = konnect_mesh_control_plane.my_meshcontrolplane.id
mesh = konnect_mesh.my_mesh.name
}
Copied!