forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routing_helper_v2.template.yaml
43 lines (43 loc) · 1.1 KB
/
routing_helper_v2.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
{%- 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:
api_config_source:
api_type: REST
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: accidents
timeout: 2s
interval: 5s
interval_jitter: 5s
unhealthy_threshold: 2
healthy_threshold: 2
outlier_detection:
success_rate_stdev_factor: 1900
http2_protocol_options: {}
{% endmacro -%}