{%- 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 -%}