Feature Request - Implement Gateway API Service Mesh and Administration (GAMMA) Specification
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
#### Feature Description
Consul currently implements Gateway API for north/south traffic. By implementing GAMMA for east/west traffic, Consul 1.19 could provide an alternative simplified UX that allows users to configure traffic using foundational xRoute APIs that have been standardized by the Gateway API community. In addition, the implementation allows us to leverage the breadth of ecosystem projects which have also standardized on the Gateway API for integrations with Service Mesh or API gateway implementations.
Prior to GAMMA, a user would need to define policies using either ServiceRouter, ServiceResolver, or ServiceSplitter and know when to use a Consul specific entry for a specific use case. Below is an example of managing east west traffic across services from web to api using L7 header matching using ServiceRouter.
```
apiVersion: consul.hashicorp.com/v1alpha1
kind: ServiceRouter
metadata:
name: web
spec:
routes:
- match:
http:
header:
- name: x-debug
exact: '1'
destination:
service: api
serviceSubset: canary
- match:
http:
queryParam:
- name: x-debug
exact: '1'
destination:
service: api
serviceSubset: canary
```
Now with GAMMA a user can configure the Mesh for a variety of use cases for HTTP services using the HTTPRoute API. Services using other protocols such as TCP and GRPC could also leverage the TCPRoute and GRPCRoute APIs for configuring traffic.
```
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: web
spec:
parentRefs:
- kind: Service
name: web
rules:
- matches:
- headers:
- type: Exact
name: x-debug
value: 1
method: GET
backendRefs:
- name: api
port: 8080
- matches:
- queryParams:
- type: Exact
name: x-debug
value: 1
method: GET
backendRefs:
- name: api
port: 8080
```
#### Use Case(s)
Service Mesh for Consul on Kubernetes
Contributor guide
Research direction
No files, tests, or implementation entry points are identified. Start by reviewing Consul's existing Gateway API support and the GAMMA requirements for HTTPRoute, TCPRoute, and GRPCRoute; done means east/west service-mesh traffic can be configured through these foundational APIs and supports the described Kubernetes use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- backend-api-design, distributed-systems, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100