blob: 74483231cc68168e5d6b7a66d9d4da79f14ebbf1 [file] [log] [blame]
Sergio Slobodrian6570c742017-08-07 23:11:33 -04001{
2 "listeners": [
3 {
4 "address": "tcp://0.0.0.0:{{- .HttpPort }}",
5 "filters": [
6 {
7 "type": "read",
8 "name": "http_connection_manager",
9 "config": {
10 "codec_type": "http1",
11 "stat_prefix": "ingress_http1",
12 "access_log": [
13 {
14 "path": "/envoy/voltha_access1_log.log"
15 }
16 ],
17 "route_config": {
18 "virtual_hosts": [
19 {
20 "name": "backend2",
21 "domains": ["*"],
22 "routes": [
23 {
24 "timeout_ms": 0,
25 "prefix": "/voltha.VolthaGlobalService/CreateDevice",
26 "cluster": "voltha-grpc-RR"
27 },
28 {
29 "timeout_ms": 0,
30 "prefix": "/voltha.VolthaGlobalService",
31 "cluster": "voltha-grpc"
32 },
33 {
34 "timeout_ms": 0,
35 "prefix": "/voltha.",
36 "cluster": "voltha-grpc"
37 },
38 {
39 "timeout_ms": 0,
40 "prefix": "/schema.SchemaService",
41 "cluster": "voltha-grpc"
42 }
43 ]
44 }
45 ]
46 },
47 "filters": [
48 {
49 "type": "both",
50 "name": "grpc_json_transcoder",
51 "config": {
52 "proto_descriptor": "/envoy/proto.pb",
53 "services": ["voltha.VolthaGlobalService"],
54 "print_options": {
55 "add_whitespace": false,
56 "always_print_primitive_fields": false,
57 "always_print_enums_as_ints": false,
58 "preserve_proto_field_names": false
59
60 }
61 }
62 },
63 {
64 "type": "both",
65 "name": "grpc_http1_bridge",
66 "config": {}
67 },
68 {
69 "type": "decoder",
70 "name": "router",
71 "config": {}
72 }
73 ]
74 }
75 }
76 ]
77 },
78 {
79 "address": "tcp://0.0.0.0:{{- .GrpcPort }}",
80 "filters": [
81 {
82 "type": "read",
83 "name": "http_connection_manager",
84 "config": {
85 "codec_type": "http2",
86 "stat_prefix": "ingress_http2",
87 "access_log": [
88 {
89 "path": "/envoy/voltha_access2_log.log"
90 }
91 ],
92 "route_config": {
93 "virtual_hosts": [
94 {
95 "name": "backend",
96 "domains": ["*"],
97 "routes": [
98 {
99 "timeout_ms": 0,
100 "prefix": "/voltha.VolthaGlobalService/CreateDevice",
101 "cluster": "voltha-grpc-RR"
102 },
103 {
104 "timeout_ms": 0,
105 "prefix": "/voltha.VolthaGlobalService",
106 "cluster": "voltha-grpc"
107 },
108 {
109 "timeout_ms": 0,
110 "prefix": "/voltha.",
111 "cluster": "voltha-grpc"
112 },
113 {
114 "timeout_ms": 0,
115 "prefix": "/schema.SchemaService",
116 "cluster": "voltha-grpc"
117 }
118 ]
119 }
120 ]
121 },
122 "filters": [
123 {
124 "type": "decoder",
125 "name": "router",
126 "config": {}
127 }
128 ]
129 }
130 }
131 ]
132 }
133 ],
134 "admin": {
135 "access_log_path": "/envoy/access.log",
136 "address": "tcp://0.0.0.0:8001"
137 },
138 "cluster_manager": {
139 "clusters": [
140 {
141 "name": "voltha-grpc",
142 "connect_timeout_ms": 250,
143 "type": "static",
144 "lb_type": "round_robin",
145 "features": "http2",
146 "hosts": [
147 {
148 "url": "tcp://{{- .VolthaVip }}"
149 }
150 ]
151 },
152 {
153 "name": "voltha-grpc-RR",
154 "connect_timeout_ms": 250,
155 "type": "static",
156 "lb_type": "round_robin",
157 "features": "http2",
158 "hosts": [
159 {{block "addrlist" .VolthaRR}}
160 {{- range .}}
161 {{- if isFirst}}
162 {{- printf "{\"url\": \"tcp://%s\"}" . }}
163 {{- else }}
164 {{- printf ",{\"url\": \"tcp://%s\"}" . }}
165 {{- end }}
166 {{- end}}
167 {{- end}}
168 ]
169 }
170 ]
171 }
172}
173