hashicorp / hashicorp/consul

service-router dynamic path based routing

Open
#9,712 2 comments 1 reaction 0 assignees View on GitHub
theme/connect theme/operator-usability type/enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.