Open
Description
Description:
The HTTPRoute resource allows for defining two 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