In order to route the traffic to internal services you need to add a tag and some metadata to the service definition before Flightpath can identify it as a valid target.
- Tag the service with
- Add metadata
flightpath-route-main = the-domain.tld/path
and you should be able to access the service on
Flightpath can route traffic to any service. It does not matter if the service has connect sidecar or not, if a service is registered in consul catalog with proper tag and metadata Flightpath can route traffic to it.
Flightpath watches consul catalog for services tagged with
in-flightpath tag. A service with this tag means it is expected
to receive traffic from edge.
After discovering the services Flightpath looks for service metadata. Any metadata attribute that starts with
is used for routing configuration.
Flightpath only cares about the
flightpath-route prefix on metadata key. You can configure as many routes as you want
simply by adding more meta attributes with this prefix.
For example one service can have
to configure three different routes with different domains and paths.
The value of a matching attribute must adhere to one of the following forms:
If the value is a fully qualified domain name then all the requests for this domain are routed to the service
If the value starts with a forward slash
/then it is assumed to be a path based match. In this case the domain is set to wildcard, e.g. every request to
/pathwill be routed to the service regardless of the domain.
Only the requests to specified path on specified domain are routed to the service.
If the value has
*as suffix it is assumed to be a prefix based match. In this case every request that matches the path prefix will be routed to the service, e.g.
*/path-prefix/one/two/threeif the domain is omitted.