traefik / mesh

Traefik Mesh - Simpler Service Mesh
https://traefik.io/traefik-mesh
Apache License 2.0
2.02k stars 141 forks source link

Add support for header-based filtering on TrafficTargets #705

Closed jspdown closed 4 years ago

jspdown commented 4 years ago

What does this PR do?

This PR adds support for header-based filtering on TrafficTargets. As described in the specification, an HTTPRouteGroup can define a set of headers that must match to pass through.

https://github.com/servicemeshinterface/smi-spec/blob/master/apis/traffic-specs/v1alpha3/traffic-specs.md#http-header-filters

kind: HTTPRouteGroup
metadata:
  name: the-routes
  namespace: default
spec:
  matches:
  - name: android-insiders
    headers:
    - user-agent: ".*Android.*"
    - cookie: "^(.*?;)?(type=insider)(;.*)?$"

How to test it