forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routing_helper.template.yaml
50 lines (50 loc) · 1.4 KB
/
routing_helper.template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{%- macro make_route_internal(cluster, options) %}
cluster: {{ cluster }}
{%- if 'timeout' in options -%}
timeout: {{ options['timeout'] }},
{% endif %}
retry_policy:
retry_on: 5xx
{%- endmacro %}
{%- macro make_route(cluster) -%}
{{ make_route_internal(cluster, clusters.get(cluster, {})) }}
{%- endmacro -%}
{%- macro internal_cluster_definition(service, options) -%}
name: {{ service }}
connect_timeout: 0.250s
type: EDS
eds_cluster_config:
eds_config:
resource_api_version: V3
api_config_source:
api_type: REST
transport_api_version: V3
cluster_names:
- sds
refresh_delay: 30s
service_name: {{ service }}
lb_policy: LEAST_REQUEST
{% if 'max_requests' in options -%}
circuit_breakers:
thresholds:
- priority: DEFAULT
max_requests: {{ options['max_requests'] }}
{% endif -%}
health_checks:
- http_health_check:
path: /healthcheck
service_name_matcher:
prefix: accidents
timeout: 2s
interval: 5s
interval_jitter: 5s
unhealthy_threshold: 2
healthy_threshold: 2
outlier_detection:
success_rate_stdev_factor: 1900
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
explicit_http_config:
http2_protocol_options: {}
{% endmacro -%}