Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ambassador/ambassador/envoy/v2/v2route.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ def __init__(self, config: 'V2Config', group: IRHTTPMappingGroup) -> None:
}
}

idle_timeout_ms = group.get('idle_timeout_ms', None)

if idle_timeout_ms is not None:
route['idle_timeout'] = "%0.3fs" % (idle_timeout_ms / 1000.0)

if group.get('rewrite', None):
route['prefix_rewrite'] = group['rewrite']

Expand Down
1 change: 1 addition & 0 deletions ambassador/ambassador/ir/irhttpmapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class IRHTTPMapping (IRBaseMapping):
"shadow": True,
"cluster_timeout_ms": True,
"timeout_ms": True,
"idle_timeout_ms": True,
"tls": True,
"use_websocket": True,
"weight": True,
Expand Down
3 changes: 2 additions & 1 deletion ambassador/ambassador/ir/irhttpmappinggroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class IRHTTPMappingGroup (IRBaseMappingGroup):
'rewrite': True,
'cluster_timeout_ms': True,
'timeout_ms': True,
'idle_timeout_ms': True,
'bypass_auth': True,
'load_balancer': True
}
Expand Down Expand Up @@ -331,5 +332,5 @@ def finalize(self, ir: 'IR', aconf: Config) -> List[IRCluster]:
# Flatten the case_sensitive field for host_redirect if it exists
if 'case_sensitive' in redir:
self['case_sensitive'] = redir['case_sensitive']

return []
1 change: 1 addition & 0 deletions ambassador/schemas/v1/Mapping.schema
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"shadow": { "type": "boolean" },
"cluster_timeout_ms": { "type": "integer" },
"timeout_ms": { "type": "integer" },
"idle_timeout_ms": { "type": "integer" },
"tls": { "type": [ "string", "boolean" ] },
"use_websocket": { "type": "boolean" },
"weight": { "type": "integer" },
Expand Down