envoyproxy / envoyproxy/gateway
Support RegularExpression as a HTTPRoute HeaderMatchType
- Langage dominant
- Go
- Étoiles
- 3k
- Forks
- 864
- Merge moyen
- 2 j 2 h
- PR mergées (30 j)
- 140
Description
*Description*:
The HTTPRoute resource allows for defining two [HeaderMatchType](https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.HeaderMatchType): Exact (Core) and RegularExpression (Implementation specific).
Envoy Gateway only supports the Exact match type, and it would be really nice to have regex support.
I want to use it to make routing decisions based on a partial header match - like so:
```
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: grafana
spec:
rules:
- matches:
- header:
type: RegularExpression
name: "Host"
value: "^grafana"
backendRefs:
- name: grafana
port: 80
```
This would be really useful, as spec.hostnames only supports doing a full FQDN match, or a wildcard subdomain. I want to match like "grafana.*" so I can better repurpose my HTTPRoutes for a general setup, without having to use complex variable substitution and whatnot.
I believe it should be somewhat trivial to implement as[ it is already a feature in Envoy ](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto)
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.