blob: fcdc8a4a39f71060c62f1c6199d8c583fab3c429 [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 },
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:{{- .GrpcPort }}",
80 "filters": [
81 {
82 "type": "read",
83 "name": "http_connection_manager",
84 "config": {
85 "codec_type": "http2",
86 "stat_prefix": "ingress_http2",
87 "access_log": [
88 {
89 "path": "/envoy/voltha_access2_log.log"
90 }
91 ],
92 "route_config": {
93 "virtual_hosts": [
94 {
95 "name": "backend",
96 "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": "decoder",
125 "name": "router",
126 "config": {}
127 }
128 ]
129 }
130 }
131 ]
132 }
133 ],
134 "admin": {
135 "access_log_path": "/envoy/access.log",
136 "address": "tcp://0.0.0.0:8001"
137 },
138 "cluster_manager": {
139 "clusters": [
140 {
141 "name": "voltha-grpc",
142 "connect_timeout_ms": 250,
143 "type": "static",
144 "lb_type": "round_robin",
145 "features": "http2",
146 "hosts": [
147 {
148 "url": "tcp://{{- .VolthaVip }}"
149 }
150 ]
151 },
152 {
153 "name": "voltha-grpc-RR",
154 "connect_timeout_ms": 250,
155 "type": "static",
156 "lb_type": "round_robin",
157 "features": "http2",
158 "hosts": [
159 {{block "addrlist" .VolthaRR}}
160 {{- range .}}
161 {{- if isFirst}}
162 {{- printf "{\"url\": \"tcp://%s\"}" . }}
163 {{- else }}
164 {{- printf ",{\"url\": \"tcp://%s\"}" . }}
165 {{- end }}
166 {{- end}}
167 {{- end}}
168 ]
169 }
170 ]
171 }
172}
173