blob: a8e41eed7a3ec41fa8d7218eee93b61e635ba3af [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 },
Sergio Slobodrian6570c742017-08-07 23:11:33 -040068 {
69 "type": "decoder",
70 "name": "router",
71 "config": {}
72 }
73 ]
74 }
75 }
76 ]
77 },
78 {
79 "address": "tcp://0.0.0.0:{{- .HttpPort }}",
80 "filters": [
81 {
82 "type": "read",
83 "name": "http_connection_manager",
84 "config": {
85 "codec_type": "http1",
86 "stat_prefix": "ingress_http1",
87 "access_log": [
88 {
89 "path": "/envoy/voltha_access1_log.log"
90 }
91 ],
92 "route_config": {
93 "virtual_hosts": [
94 {
Sergio Slobodrian6e270c12017-08-09 23:06:49 -040095 "name": "backend3",
Sergio Slobodrian6570c742017-08-07 23:11:33 -040096 "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": "both",
125 "name": "grpc_json_transcoder",
126 "config": {
127 "proto_descriptor": "/envoy/proto.pb",
128 "services": ["voltha.VolthaGlobalService"],
129 "print_options": {
130 "add_whitespace": false,
131 "always_print_primitive_fields": false,
132 "always_print_enums_as_ints": false,
133 "preserve_proto_field_names": false
134
135 }
136 }
137 },
Sergio Slobodrian6570c742017-08-07 23:11:33 -0400138 {
139 "type": "decoder",
140 "name": "router",
141 "config": {}
142 }
143 ]
144 }
145 }
146 ]
147 },
148 {
149 "address": "tcp://0.0.0.0:{{- .GrpcPort }}",
Sergio Slobodrianbe829272017-07-17 14:45:45 -0400150 "filters": [
151 {
152 "type": "read",
153 "name": "http_connection_manager",
154 "config": {
155 "codec_type": "http2",
156 "stat_prefix": "ingress_http2",
157 "access_log": [
158 {
Sergio Slobodrian6570c742017-08-07 23:11:33 -0400159 "path": "/envoy/voltha_access2_log.log"
Sergio Slobodrianbe829272017-07-17 14:45:45 -0400160 }
161 ],
162 "route_config": {
163 "virtual_hosts": [
164 {
165 "name": "backend",
166 "domains": ["*"],
167 "routes": [
168 {
169 "timeout_ms": 0,
170 "prefix": "/voltha.VolthaGlobalService/CreateDevice",
171 "cluster": "voltha-grpc-RR"
172 },
173 {
174 "timeout_ms": 0,
175 "prefix": "/voltha.VolthaGlobalService",
176 "cluster": "voltha-grpc"
177 },
178 {
179 "timeout_ms": 0,
180 "prefix": "/voltha.",
181 "cluster": "voltha-grpc"
Sergio Slobodrian58adc122017-07-31 14:36:42 -0400182 },
183 {
184 "timeout_ms": 0,
185 "prefix": "/schema.SchemaService",
186 "cluster": "voltha-grpc"
Sergio Slobodrianbe829272017-07-17 14:45:45 -0400187 }
188 ]
189 }
190 ]
191 },
192 "filters": [
193 {
194 "type": "decoder",
195 "name": "router",
196 "config": {}
197 }
198 ]
199 }
200 }
201 ]
202 }
203 ],
204 "admin": {
205 "access_log_path": "/envoy/access.log",
206 "address": "tcp://0.0.0.0:8001"
207 },
208 "cluster_manager": {
209 "clusters": [
210 {
211 "name": "voltha-grpc",
212 "connect_timeout_ms": 250,
213 "type": "static",
214 "lb_type": "round_robin",
215 "features": "http2",
216 "hosts": [
217 {
218 "url": "tcp://{{- .VolthaVip }}"
219 }
220 ]
221 },
222 {
223 "name": "voltha-grpc-RR",
224 "connect_timeout_ms": 250,
225 "type": "static",
226 "lb_type": "round_robin",
227 "features": "http2",
228 "hosts": [
229 {{block "addrlist" .VolthaRR}}
230 {{- range .}}
231 {{- if isFirst}}
232 {{- printf "{\"url\": \"tcp://%s\"}" . }}
233 {{- else }}
234 {{- printf ",{\"url\": \"tcp://%s\"}" . }}
235 {{- end }}
236 {{- end}}
237 {{- end}}
238 ]
239 }
240 ]
241 }
242}
243