blob: 7b7461f72ec221aa395693c26c4ebc740f364fe8 [file] [log] [blame]
Sergio Slobodrian6570c742017-08-07 23:11:33 -04001{
2 "listeners": [
3 {
4 "address": "tcp://0.0.0.0:{{- .HttpsPort }}",
5 "ssl_context": {
6 "cert_chain_file": "/envoy/pki/voltha.crt",
7 "private_key_file": "/envoy/pki/voltha.key",
8 "ca_cert_file": "/envoy/pik/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:{{- .GrpcPort }}",
85 "filters": [
86 {
87 "type": "read",
88 "name": "http_connection_manager",
89 "config": {
90 "codec_type": "http2",
91 "stat_prefix": "ingress_http2",
92 "access_log": [
93 {
94 "path": "/envoy/voltha_access2_log.log"
95 }
96 ],
97 "route_config": {
98 "virtual_hosts": [
99 {
100 "name": "backend",
101 "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": "decoder",
130 "name": "router",
131 "config": {}
132 }
133 ]
134 }
135 }
136 ]
137 }
138 ],
139 "admin": {
140 "access_log_path": "/envoy/access.log",
141 "address": "tcp://0.0.0.0:8001"
142 },
143 "cluster_manager": {
144 "clusters": [
145 {
146 "name": "voltha-grpc",
147 "connect_timeout_ms": 250,
148 "type": "static",
149 "lb_type": "round_robin",
150 "features": "http2",
151 "hosts": [
152 {
153 "url": "tcp://{{- .VolthaVip }}"
154 }
155 ]
156 },
157 {
158 "name": "voltha-grpc-RR",
159 "connect_timeout_ms": 250,
160 "type": "static",
161 "lb_type": "round_robin",
162 "features": "http2",
163 "hosts": [
164 {{block "addrlist" .VolthaRR}}
165 {{- range .}}
166 {{- if isFirst}}
167 {{- printf "{\"url\": \"tcp://%s\"}" . }}
168 {{- else }}
169 {{- printf ",{\"url\": \"tcp://%s\"}" . }}
170 {{- end }}
171 {{- end}}
172 {{- end}}
173 ]
174 }
175 ]
176 }
177}
178