diff --git a/ambassador/ambassador/envoy/v2/v2route.py b/ambassador/ambassador/envoy/v2/v2route.py index 90dbaf8d9e..1496483dbd 100644 --- a/ambassador/ambassador/envoy/v2/v2route.py +++ b/ambassador/ambassador/envoy/v2/v2route.py @@ -91,10 +91,10 @@ 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 'idle_timeout_ms' in group: + route['idle_timeout'] = "%0.3fs" % (group['idle_timeout_ms']/ 1000.0) + elif 'idle_timeout_ms' in config.ir.ambassador_module: + route['idle_timeout'] = "%0.3fs" % (config.ir.ambassador_module['idle_timeout_ms'] / 1000.0) if group.get('rewrite', None): route['prefix_rewrite'] = group['rewrite']