b21cd112e5
This commit adds the necessary changes to allow an ingress gateway to route traffic from a single defined port to multiple different upstream services in the Consul mesh. To do this, we now require all HTTP requests coming into the ingress gateway to specify a Host header that matches "<service-name>.*" in order to correctly route traffic to the correct service. - Differentiate multiple listener's route names by port - Adds a case in xds for allowing default discovery chains to create a route configuration when on an ingress gateway. This allows default services to easily use host header routing - ingress-gateways have a single route config for each listener that utilizes domain matching to route to different services.
30 lines
452 B
HCL
30 lines
452 B
HCL
enable_central_service_config = true
|
|
|
|
config_entries {
|
|
bootstrap = [
|
|
{
|
|
kind = "ingress-gateway"
|
|
name = "ingress-gateway"
|
|
|
|
listeners = [
|
|
{
|
|
port = 9999
|
|
protocol = "http"
|
|
services = [
|
|
{
|
|
name = "*"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
kind = "proxy-defaults"
|
|
name = "global"
|
|
config {
|
|
protocol = "http"
|
|
}
|
|
}
|
|
]
|
|
}
|