blob: dffebc231e8faa4066789207aeac225ea7ea9762 [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.",
"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"],
"print_options": {
"add_whitespace": false,
"always_print_primitive_fields": false,
"always_print_enums_as_ints": false,
"preserve_proto_field_names": false
}
}
},
{
"type": "both",
"name": "grpc_http1_bridge",
"config": {}
},
{
"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.",
"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"],
"print_options": {
"add_whitespace": false,
"always_print_primitive_fields": false,
"always_print_enums_as_ints": false,
"preserve_proto_field_names": false
}
}
},
{
"type": "both",
"name": "grpc_http1_bridge",
"config": {}
},
{
"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.",
"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": [
{
"url": "tcp://{{- .VolthaVip }}"
}
]
},
{
"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}}
]
}
]
}
}