forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
envoy_router_v2.template.yaml
52 lines (52 loc) · 1.1 KB
/
envoy_router_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
44
45
46
47
48
49
50
51
52
{% import 'routing_helper_v2.template.yaml' as helper with context -%}
name: local_route
virtual_hosts:
- name: www
domains:
- www.yourcompany.com
routes:
- match:
prefix: "/foo/bar"
runtime_fraction:
default_value:
numerator: 0
denominator: HUNDRED
runtime_key: routing.www.use_service_2
route:
{{ helper.make_route('service2')|indent(4) }}
- match:
prefix: "/"
route:
{{ helper.make_route('service1')|indent(4) }}
require_tls: ALL
rate_limits:
actions:
remote_address: {}
- name: www_redirect
domains:
- wwww.yourcompany.net
routes:
- match:
prefix: "/"
redirect:
host_redirect: www.yourcompany.net
require_tls: ALL
rate_limits:
- actions:
remote_address: {}
- name: api
domains:
- api.yourcompany.net
routes:
- match:
path: "/foo/bar"
route:
{{ helper.make_route('service3')|indent(4) }}
- match:
prefix: "/"
route:
{{ helper.make_route('service1')|indent(4) }}
require_tls: EXTERNAL_ONLY
rate_limits:
- actions:
remote_address: {}