blob: dffebc231e8faa4066789207aeac225ea7ea9762 [file] [log] [blame]
Sergio Slobodrianbe829272017-07-17 14:45:45 -04001{
2 "listeners": [
3 {
Sergio Slobodrian6570c742017-08-07 23:11:33 -04004 "address": "tcp://0.0.0.0:{{- .HttpsPort }}",
5 "ssl_context": {
6 "cert_chain_file": "/envoy/voltha.crt",
7 "private_key_file": "/envoy/voltha.key",
8 "ca_cert_file": "/envoy/voltha-CA.pem"
9 },
10 "filters": [
11 {
12 "type": "read",
13 "name": "http_connection_manager",
14 "config": {
15 "codec_type": "http1",
16 "stat_prefix": "ingress_http1",
17 "access_log": [
18 {
19 "path": "/envoy/voltha_access1_log.log"
20 }
21 ],
22 "route_config": {
23 "virtual_hosts": [
24 {
25 "name": "backend2",
26 "domains": ["*"],
27 "routes": [
28 {
29 "timeout_ms": 0,
30 "prefix": "/voltha.VolthaGlobalService/CreateDevice",
31 "cluster": "voltha-grpc-RR"
32 },
33 {
34 "timeout_ms": 0,
35 "prefix": "/voltha.VolthaGlobalService",
36 "cluster": "voltha-grpc"
37 },
38 {
39 "timeout_ms": 0,
40 "prefix": "/voltha.",
41 "cluster": "voltha-grpc"
42 },
43 {
44 "timeout_ms": 0,
45 "prefix": "/schema.SchemaService",
46 "cluster": "voltha-grpc"
47 }
48 ]
49 }
50 ]
51 },
52 "filters": [
53 {
54 "type": "both",
55 "name": "grpc_json_transcoder",
56 "config": {
57 "proto_descriptor": "/envoy/proto.pb",
58 "services": ["voltha.VolthaGlobalService"],
59 "print_options": {
60 "add_whitespace": false,
61 "always_print_primitive_fields": false,
62 "always_print_enums_as_ints": false,
63 "preserve_proto_field_names": false
64
65 }
66 }
67 },
68 {
69 "type": "both",
70 "name": "grpc_http1_bridge",
71 "config": {}
72 },
73 {
74 "type": "decoder",
75 "name": "router",
76 "config": {}
77 }
78 ]
79 }
80 }
81 ]
82 },
83 {
84 "address": "tcp://0.0.0.0:{{- .HttpPort }}",
85 "filters": [
86 {
87 "type": "read",
88 "name": "http_connection_manager",
89 "config": {
90 "codec_type": "http1",
91 "stat_prefix": "ingress_http1",
92 "access_log": [
93 {
94 "path": "/envoy/voltha_access1_log.log"
95 }
96 ],
97 "route_config": {
98 "virtual_hosts": [
99 {
Sergio Slobodrian6e270c12017-08-09 23:06:49 -0400100 "name": "backend3",
Sergio Slobodrian6570c742017-08-07 23:11:33 -0400101 "domains": ["*"],
102 "routes": [
103 {
104 "timeout_ms": 0,
105 "prefix": "/voltha.VolthaGlobalService/CreateDevice",
106 "cluster": "voltha-grpc-RR"
107 },
108 {
109 "timeout_ms": 0,
110 "prefix": "/voltha.VolthaGlobalService",
111 "cluster": "voltha-grpc"
112 },
113 {
114 "timeout_ms": 0,
115 "prefix": "/voltha.",
116 "cluster": "voltha-grpc"
117 },
118 {
119 "timeout_ms": 0,
120 "prefix": "/schema.SchemaService",
121 "cluster": "voltha-grpc"
122 }
123 ]
124 }
125 ]
126 },
127 "filters": [
128 {
129 "type": "both",
130 "name": "grpc_json_transcoder",
131 "config": {
132 "proto_descriptor": "/envoy/proto.pb",
133 "services": ["voltha.VolthaGlobalService"],
134 "print_options": {
135 "add_whitespace": false,
136 "always_print_primitive_fields": false,
137 "always_print_enums_as_ints": false,
138 "preserve_proto_field_names": false
139
140 }
141 }
142 },
143 {
144 "type": "both",
145 "name": "grpc_http1_bridge",
146 "config": {}
147 },
148 {
149 "type": "decoder",
150 "name": "router",
151 "config": {}
152 }
153 ]
154 }
155 }
156 ]
157 },
158 {
159 "address": "tcp://0.0.0.0:{{- .GrpcPort }}",
Sergio Slobodrianbe829272017-07-17 14:45:45 -0400160 "filters": [
161 {
162 "type": "read",
163 "name": "http_connection_manager",
164 "config": {
165 "codec_type": "http2",
166 "stat_prefix": "ingress_http2",
167 "access_log": [
168 {
Sergio Slobodrian6570c742017-08-07 23:11:33 -0400169 "path": "/envoy/voltha_access2_log.log"
Sergio Slobodrianbe829272017-07-17 14:45:45 -0400170 }
171 ],
172 "route_config": {
173 "virtual_hosts": [
174 {
175 "name": "backend",
176 "domains": ["*"],
177 "routes": [
178 {
179 "timeout_ms": 0,
180 "prefix": "/voltha.VolthaGlobalService/CreateDevice",
181 "cluster": "voltha-grpc-RR"
182 },
183 {
184 "timeout_ms": 0,
185 "prefix": "/voltha.VolthaGlobalService",
186 "cluster": "voltha-grpc"
187 },
188 {
189 "timeout_ms": 0,
190 "prefix": "/voltha.",
191 "cluster": "voltha-grpc"
Sergio Slobodrian58adc122017-07-31 14:36:42 -0400192 },
193 {
194 "timeout_ms": 0,
195 "prefix": "/schema.SchemaService",
196 "cluster": "voltha-grpc"
Sergio Slobodrianbe829272017-07-17 14:45:45 -0400197 }
198 ]
199 }
200 ]
201 },
202 "filters": [
203 {
204 "type": "decoder",
205 "name": "router",
206 "config": {}
207 }
208 ]
209 }
210 }
211 ]
212 }
213 ],
214 "admin": {
215 "access_log_path": "/envoy/access.log",
216 "address": "tcp://0.0.0.0:8001"
217 },
218 "cluster_manager": {
219 "clusters": [
220 {
221 "name": "voltha-grpc",
222 "connect_timeout_ms": 250,
223 "type": "static",
224 "lb_type": "round_robin",
225 "features": "http2",
226 "hosts": [
227 {
228 "url": "tcp://{{- .VolthaVip }}"
229 }
230 ]
231 },
232 {
233 "name": "voltha-grpc-RR",
234 "connect_timeout_ms": 250,
235 "type": "static",
236 "lb_type": "round_robin",
237 "features": "http2",
238 "hosts": [
239 {{block "addrlist" .VolthaRR}}
240 {{- range .}}
241 {{- if isFirst}}
242 {{- printf "{\"url\": \"tcp://%s\"}" . }}
243 {{- else }}
244 {{- printf ",{\"url\": \"tcp://%s\"}" . }}
245 {{- end }}
246 {{- end}}
247 {{- end}}
248 ]
249 }
250 ]
251 }
252}
253