blob: 566ce68192bc8b6180a1b42e88e8feda932c9da1 [file] [log] [blame]
Stephane Barbarie1e28f3e2019-02-08 15:45:20 -05001# Copyright 2019-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14apiVersion: v1
15data:
16 arouter.voltha.json: |
17 {
18 "servers": [
19 {
20 "name": "grpc_command",
21 "port": 55555,
22 "address": "",
23 "type": "grpc",
24 "routers": [
25 {
26 "_TODO": "Suport a router list, remove the package and service from the router",
27 "package": "voltha",
28 "service": "VolthaService",
29 "router": "vcore"
30 }
31 ]
32 }
33 ],
34 "routers": [
35 {
36 "name": "vcore",
37 "package": "voltha",
38 "service": "VolthaService",
39 "routes": [
40 {
41 "name": "dev_manager",
42 "proto_descriptor": "voltha.pb",
43 "type": "rpc_affinity_message",
44 "association": "round_robin",
45 "routing_field": "id",
46 "backend_cluster": "vcore",
47 "_COMMENT": "Methods here MUST be specified above, this overrides thier default beahvior",
48 "methods": [
49 "CreateDevice",
50 "GetCoreInstance",
51 "EnableLogicalDevicePort",
52 "DisableLogicalDevicePort",
53 "EnableDevice",
54 "DisableDevice",
55 "RebootDevice",
56 "DeleteDevice",
57 "DownloadImage",
58 "CancelImageDownload",
59 "ActivateImageUpdate",
60 "RevertImageUpdate",
61 "UpdateDevicePmConfigs",
62 "CreateAlarmFilter",
63 "UpdateAlarmFilter",
64 "DeleteAlarmFilter",
65 "SelfTest"
66 ],
67 "nb_binding_methods": [
68 "CreateDevice"
69 ],
70 "_TODO": "Overrides not implemented yet, config ignored",
71 "overrides": [
72 {
73 "methods": [
74 "abc",
75 "def"
76 ],
77 "routing_field": "id"
78 },
79 {
80 "methods": [
81 "ghi",
82 "jkl"
83 ]
84 },
85 {
86 "method": "mno",
87 "routing_field": "id"
88 },
89 {
90 "method": "pqr"
91 }
92 ]
93 },
94 {
95 "name": "read_only",
96 "type": "round_robin",
97 "association": "round_robin",
98 "backend_cluster": "ro_vcore",
99 "methods": [
100 "ListDevicePorts",
101 "ListDevicePmConfigs",
102 "GetImages",
103 "GetImageDownloadStatus",
104 "GetImageDownload",
105 "ListImageDownloads",
106 "ListDeviceFlows",
107 "ListDeviceFlowGroups",
108 "ListLogicalDeviceFlows",
109 "ListLogicalDeviceFlowGroups",
110 "ListDevices",
111 "GetDevice",
112 "ListLogicalDevices",
113 "GetLogicalDevices",
114 "GetDeviceType",
115 "GetDeviceGroup",
116 "GetLogicalDevice",
117 "GetAlarmFilter",
118 "ListLogicalDevicePorts",
119 "GetLogicalDevicePort",
120 "ListAdapters"
121 ]
122 },
123 {
124 "name": "dev_manager_ofagent",
125 "type": "binding",
126 "_association": "round_robin",
127 "binding": {
128 "type": "header",
129 "field": "voltha_backend_name",
130 "method": "Subscribe",
131 "association": "round_robin"
132 },
133 "backend_cluster": "vcore",
134 "methods": [
135 "StreamPacketsOut",
136 "ReceivePacketsIn",
137 "ReceiveChangeEvents",
138 "Subscribe",
139 "UpdateLogicalDeviceFlowTable",
140 "UpdateLogicalDeviceFlowGroupTable",
141 "GetLogicalDevice",
142 "GetLogicalDevicePort",
143 "EnableLogicalDevicePort",
144 "DisableLogicalDevicePort",
145 "ListLogicalDevices",
146 "ListLogicalDeviceFlows",
147 "ListLogicalDeviceFlowGroups",
148 "ListLogicalDevicePorts"
149 ],
150 "_TODO": "Overrides not implemented yet, config ignored",
151 "overrides": [
152 {
153 "methods": [
154 "abc",
155 "def"
156 ],
157 "routing_field": "id"
158 },
159 {
160 "methods": [
161 "ghi",
162 "jkl"
163 ]
164 },
165 {
166 "method": "mno",
167 "routing_field": "id"
168 },
169 {
170 "method": "pqr"
171 }
172 ]
173 }
174 ]
175 }
176 ],
177 "backend_clusters": [
178 {
179 "name": "vcore",
180 "backends": [
181 {
182 "name": "vcore1",
183 "type": "active_active",
184 "association": {
185 "strategy": "serial_number",
186 "location": "header",
187 "_TODO": "The key below needs to be implemented, currently hard coded",
188 "key": "voltha_serial_number"
189 },
190 "connections": [
191 {
192 "name": "vcore11",
193 "addr": "",
194 "port": ""
195 },
196 {
197 "name": "vcore12",
198 "addr": "",
199 "port": ""
200 }
201 ]
202 },
203 {
204 "name": "vcore2",
205 "type": "active_active",
206 "association": {
207 "strategy": "serial_number",
208 "location": "header",
209 "_TODO": "The key below needs to be implemented, currently hard coded",
210 "key": "voltha_serial_number"
211 },
212 "connections": [
213 {
214 "name": "vcore21",
215 "addr": "",
216 "port": ""
217 },
218 {
219 "name": "vcore22",
220 "addr": "",
221 "port": ""
222 }
223 ]
224 },
225 {
226 "name": "vcore3",
227 "type": "active_active",
228 "association": {
229 "strategy": "serial_number",
230 "location": "header",
231 "_TODO": "The key below needs to be implemented, currently hard coded",
232 "key": "voltha_serial_number"
233 },
234 "connections": [
235 {
236 "name": "vcore31",
237 "addr": "",
238 "port": ""
239 },
240 {
241 "name": "vcore32",
242 "addr": "",
243 "port": ""
244 }
245 ]
246 }
247 ]
248 },
249 {
250 "name": "ro_vcore",
251 "backends": [
252 {
253 "name": "ro_vcore1",
254 "type": "server",
255 "connections": [
256 {
257 "name": "ro_vcore11",
258 "addr": "",
259 "port": ""
260 }
261 ]
262 },
263 {
264 "name": "ro_vcore2",
265 "type": "server",
266 "connections": [
267 {
268 "name": "ro_vcore21",
269 "addr": "",
270 "port": ""
271 }
272 ]
273 },
274 {
275 "name": "ro_vcore3",
276 "type": "server",
277 "connections": [
278 {
279 "name": "ro_vcore31",
280 "addr": "",
281 "port": ""
282 }
283 ]
284 }
285 ]
286 }
287 ],
288 "api": {
289 "_comment": "If this isn't defined then no api is available for dynamic configuration and queries",
290 "address": "",
291 "port": 55554
292 }
293 }
294
295 voltha-envoy-config.json: |
296 {
297 "listeners": [
298 {
299 "address": "tcp://0.0.0.0:8192",
300 "filters": [
301 {
302 "type": "read",
303 "name": "http_connection_manager",
304 "config": {
305 "codec_type": "http1",
306 "stat_prefix": "ingress_http1",
307 "access_log": [
308 {
309 "path": "/envoy/voltha_access1_log.log"
310 }
311 ],
312 "route_config": {
313 "virtual_hosts": [
314 {
315 "name": "backend3",
316 "domains": [
317 "*"
318 ],
319 "routes": [
320 {
321 "timeout_ms": 0,
322 "prefix": "/voltha.VolthaGlobalService/CreateDevice",
323 "cluster": "voltha-grpc"
324 },
325 {
326 "timeout_ms": 0,
327 "prefix": "/voltha.VolthaGlobalService",
328 "cluster": "voltha-grpc"
329 },
330 {
331 "timeout_ms": 0,
332 "prefix": "/voltha.HealthService",
333 "cluster": "voltha-grpc"
334 },
335 {
336 "timeout_ms": 0,
337 "prefix": "/voltha.",
338 "cluster": "voltha-grpc"
339 },
340 {
341 "timeout_ms": 0,
342 "prefix": "/schema.SchemaService",
343 "cluster": "voltha-grpc"
344 }
345 ]
346 }
347 ]
348 },
349 "filters": [
350 {
351 "type": "both",
352 "name": "grpc_json_transcoder",
353 "config": {
354 "proto_descriptor": "/envoy/voltha.pb",
355 "services": [
356 "voltha.VolthaService",
357 "voltha.HealthService",
358 "schema.SchemaService"
359 ],
360 "print_options": {
361 "add_whitespace": false,
362 "always_print_primitive_fields": true,
363 "always_print_enums_as_ints": false,
364 "preserve_proto_field_names": true
365 }
366 }
367 },
368 {
369 "type": "decoder",
370 "name": "router",
371 "config": {}
372 }
373 ]
374 }
375 }
376 ]
377 },
378 {
379 "address": "tcp://0.0.0.0:50555",
380 "filters": [
381 {
382 "type": "read",
383 "name": "http_connection_manager",
384 "config": {
385 "codec_type": "http2",
386 "stat_prefix": "ingress_http2",
387 "access_log": [
388 {
389 "path": "/envoy/voltha_access2_log.log"
390 }
391 ],
392 "route_config": {
393 "virtual_hosts": [
394 {
395 "name": "backend",
396 "domains": [
397 "*"
398 ],
399 "routes": [
400 {
401 "timeout_ms": 0,
402 "prefix": "/voltha.VolthaGlobalService/CreateDevice",
403 "cluster": "voltha-grpc"
404 },
405 {
406 "timeout_ms": 0,
407 "prefix": "/voltha.VolthaGlobalService",
408 "cluster": "voltha-grpc"
409 },
410 {
411 "timeout_ms": 0,
412 "prefix": "/voltha.HealthService",
413 "cluster": "voltha-grpc"
414 },
415 {
416 "timeout_ms": 0,
417 "prefix": "/voltha.",
418 "cluster": "voltha-grpc"
419 },
420 {
421 "timeout_ms": 0,
422 "prefix": "/schema.SchemaService",
423 "cluster": "voltha-grpc"
424 }
425 ]
426 }
427 ]
428 },
429 "filters": [
430 {
431 "type": "decoder",
432 "name": "router",
433 "config": {}
434 }
435 ]
436 }
437 }
438 ]
439 }
440 ],
441 "admin": {
442 "access_log_path": "/envoy/access.log",
443 "address": "tcp://0.0.0.0:8001"
444 },
445 "cluster_manager": {
446 "clusters": [
447 {
448 "name": "voltha-grpc",
449 "connect_timeout_ms": 250,
450 "type": "static",
451 "lb_type": "round_robin",
452 "features": "http2",
453 "hosts": [
454 {
455 "url": "tcp://127.0.0.1:55555"
456 }
457 ]
458 }
459 ]
460 }
461 }
462
463kind: ConfigMap
464metadata:
465 name: afrouter-config
466 namespace: voltha