Sergio Slobodrian | be82927 | 2017-07-17 14:45:45 -0400 | [diff] [blame] | 1 | { |
| 2 | "listeners": [ |
| 3 | { |
| 4 | "address": "tcp://0.0.0.0:50555", |
| 5 | "filters": [ |
| 6 | { |
| 7 | "type": "read", |
| 8 | "name": "http_connection_manager", |
| 9 | "config": { |
| 10 | "codec_type": "http2", |
| 11 | "stat_prefix": "ingress_http2", |
| 12 | "access_log": [ |
| 13 | { |
| 14 | "path": "/envoy/voltha_access_log.log" |
| 15 | } |
| 16 | ], |
| 17 | "route_config": { |
| 18 | "virtual_hosts": [ |
| 19 | { |
| 20 | "name": "backend", |
| 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" |
Sergio Slobodrian | 58adc12 | 2017-07-31 14:36:42 -0400 | [diff] [blame] | 37 | }, |
| 38 | { |
| 39 | "timeout_ms": 0, |
| 40 | "prefix": "/schema.SchemaService", |
| 41 | "cluster": "voltha-grpc" |
Sergio Slobodrian | be82927 | 2017-07-17 14:45:45 -0400 | [diff] [blame] | 42 | } |
| 43 | ] |
| 44 | } |
| 45 | ] |
| 46 | }, |
| 47 | "filters": [ |
| 48 | { |
| 49 | "type": "decoder", |
| 50 | "name": "router", |
| 51 | "config": {} |
| 52 | } |
| 53 | ] |
| 54 | } |
| 55 | } |
| 56 | ] |
| 57 | } |
| 58 | ], |
| 59 | "admin": { |
| 60 | "access_log_path": "/envoy/access.log", |
| 61 | "address": "tcp://0.0.0.0:8001" |
| 62 | }, |
| 63 | "cluster_manager": { |
| 64 | "clusters": [ |
| 65 | { |
| 66 | "name": "voltha-grpc", |
| 67 | "connect_timeout_ms": 250, |
| 68 | "type": "static", |
| 69 | "lb_type": "round_robin", |
| 70 | "features": "http2", |
| 71 | "hosts": [ |
| 72 | { |
| 73 | "url": "tcp://{{- .VolthaVip }}" |
| 74 | } |
| 75 | ] |
| 76 | }, |
| 77 | { |
| 78 | "name": "voltha-grpc-RR", |
| 79 | "connect_timeout_ms": 250, |
| 80 | "type": "static", |
| 81 | "lb_type": "round_robin", |
| 82 | "features": "http2", |
| 83 | "hosts": [ |
| 84 | {{block "addrlist" .VolthaRR}} |
| 85 | {{- range .}} |
| 86 | {{- if isFirst}} |
| 87 | {{- printf "{\"url\": \"tcp://%s\"}" . }} |
| 88 | {{- else }} |
| 89 | {{- printf ",{\"url\": \"tcp://%s\"}" . }} |
| 90 | {{- end }} |
| 91 | {{- end}} |
| 92 | {{- end}} |
| 93 | ] |
| 94 | } |
| 95 | ] |
| 96 | } |
| 97 | } |
| 98 | |