service-router dynamic path based routing
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
#### Feature Description
Service routers currently require a static `PathPrefix` and destination `Service` eg:
```hcl
Kind = "service-router"
Name = "internal-api"
Routes = [
{
Match {
HTTP {
PathPrefix = "/service1"
}
}
Destination {
Service = "service1"
}
},
...
]
```
What I would like to be able to do is something like:
```hcl
Kind = "service-router"
Name = "internal-api"
Routes = [
{
Match {
HTTP {
PathPrefix = "/{svc}/"
}
}
Destination {
Service = "{svc}"
PathPrefix = "/"
}
}
]
```
#### Use Case(s)
We currently have a linkerd installation across some our legacy (non-docker) and newer (docker) systems. These legacy systems are all accessing the linkerd service mesh via path based routing: `http://localhost:4140/{servicename}/path`, `{servicename}` is resolved from Consul via linkerd.
Since we have Consul rolled out for some time now, we would like to consolidate on Consul/Connect and this would be the simplest migration for those legacy services.
Contributor guide
Assessment
This issue has not been assessed yet.