blob: 5ba984fcf42f3da77c3b44f19468c59584f6817d [file] [log] [blame]
{
"listeners": [
{
"address": "tcp://0.0.0.0:{{- .HttpsPort }}",
"ssl_context": {
"cert_chain_file": "/envoy/voltha.crt",
"private_key_file": "/envoy/voltha.key",
"ca_cert_file": "/envoy/voltha-CA.pem"
},
"filters": [
{
"type": "read",
"name": "http_connection_manager",
"config": {
"codec_type": "http1",
"stat_prefix": "ingress_http1",
"access_log": [
{
"path": "/envoy/voltha_access1_log.log"
}
],
"route_config": {
"virtual_hosts": [
{
"name": "backend2",
"domains": ["*"],
"routes": [
{
"timeout_ms": 0,
"prefix": "/voltha.VolthaGlobalService/CreateDevice",
"cluster": "voltha-grpc-RR"
},
{
"timeout_ms": 0,
"prefix": "/voltha.VolthaGlobalService",
"cluster": "voltha-grpc"
},
{
"timeout_ms": 0,
"prefix": "/voltha.HealthService",
"cluster": "voltha-grpc"
},
{
"timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
{
"timeout_ms": 0,
"prefix": "/schema.SchemaService",
"cluster": "voltha-grpc"
}
]
}
]
},
"filters": [
{
"type": "both",
"name": "grpc_json_transcoder",
"config": {
"proto_descriptor": "/envoy/proto.pb",
"services": ["voltha.VolthaGlobalService","voltha.HealthService","schema.SchemaService"],
"print_options": {
"add_whitespace": false,
"always_print_primitive_fields": true,
"always_print_enums_as_ints": false,
"preserve_proto_field_names": true
}
}
},
{
"type": "decoder",
"name": "router",
"config": {}
}
]
}
}
]
},
{
"address": "tcp://0.0.0.0:{{- .HttpPort }}",
"filters": [
{
"type": "read",
"name": "http_connection_manager",
"config": {
"codec_type": "http1",
"stat_prefix": "ingress_http1",
"access_log": [
{
"path": "/envoy/voltha_access1_log.log"
}
],
"route_config": {
"virtual_hosts": [
{
"name": "backend3",
"domains": ["*"],
"routes": [
{
"timeout_ms": 0,
"prefix": "/voltha.VolthaGlobalService/CreateDevice",
"cluster": "voltha-grpc-RR"
},
{
"timeout_ms": 0,
"prefix": "/voltha.VolthaGlobalService",
"cluster": "voltha-grpc"
},
{
"timeout_ms": 0,
"prefix": "/voltha.HealthService",
"cluster": "voltha-grpc"
},
{
"timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
{
"timeout_ms": 0,
"prefix": "/schema.SchemaService",
"cluster": "voltha-grpc"
}
]
}
]
},
"filters": [
{
"type": "both",
"name": "grpc_json_transcoder",
"config": {
"proto_descriptor": "/envoy/proto.pb",
"services": ["voltha.VolthaGlobalService","voltha.HealthService","schema.SchemaService"],
"print_options": {
"add_whitespace": false,
"always_print_primitive_fields": true,
"always_print_enums_as_ints": false,
"preserve_proto_field_names": true
}
}
},
{
"type": "decoder",
"name": "router",
"config": {}
}
]
}
}
]
},
{
"address": "tcp://0.0.0.0:{{- .GrpcPort }}",
"filters": [
{
"type": "read",
"name": "http_connection_manager",
"config": {
"codec_type": "http2",
"stat_prefix": "ingress_http2",
"access_log": [
{
"path": "/envoy/voltha_access2_log.log"
}
],
"route_config": {
"virtual_hosts": [
{
"name": "backend",
"domains": ["*"],
"routes": [
{
"timeout_ms": 0,
"prefix": "/voltha.VolthaGlobalService/CreateDevice",
"cluster": "voltha-grpc-RR"
},
{
"timeout_ms": 0,
"prefix": "/voltha.VolthaGlobalService",
"cluster": "voltha-grpc"
},
{
"timeout_ms": 0,
"prefix": "/voltha.HealthService",
"cluster": "voltha-grpc"
},
{
"timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
{
"timeout_ms": 0,
"prefix": "/schema.SchemaService",
"cluster": "voltha-grpc"
}
]
}
]
},
"filters": [
{
"type": "decoder",
"name": "router",
"config": {}
}
]
}
}
]
}
],
"admin": {
"access_log_path": "/envoy/access.log",
"address": "tcp://0.0.0.0:8001"
},
"cluster_manager": {
"clusters": [
{
"name": "voltha-grpc",
"connect_timeout_ms": 250,
"type": "static",
"lb_type": "round_robin",
"features": "http2",
"hosts": [
{{block "viplist" .VolthaRR}}
{{- range .}}
{{- if isFirst2}}
{{- printf "{\"url\": \"tcp://%s\"}" . }}
{{- else }}
{{- printf ",{\"url\": \"tcp://%s\"}" . }}
{{- end }}
{{- end}}
{{- end}}
]
},
{
"name": "voltha-grpc-RR",
"connect_timeout_ms": 250,
"type": "static",
"lb_type": "round_robin",
"features": "http2",
"hosts": [
{{block "addrlist" .VolthaRR}}
{{- range .}}
{{- if isFirst}}
{{- printf "{\"url\": \"tcp://%s\"}" . }}
{{- else }}
{{- printf ",{\"url\": \"tcp://%s\"}" . }}
{{- end }}
{{- end}}
{{- end}}
]
}
]
}
}