projectcontour / contour

Contour is a Kubernetes ingress controller using Envoy proxy.
https://projectcontour.io
Apache License 2.0
3.72k stars 677 forks source link

Document how HTTPProxy route/include match condition precedence works #5774

Open sunjayBhatia opened 1 year ago

sunjayBhatia commented 1 year ago

Our request routing page has detail on what the various HTTPProxy route/include match conditions do, but not how they interact, in terms of precedence etc.: https://projectcontour.io/docs/1.26/config/request-routing/#conditions

Since Envoy matches requests against routes it is configured with in the order it is presented them, we sort routes for a given virtualhost based on precedence of the route match conditions that are configured.

This route sorting is performed here: https://github.com/projectcontour/contour/blob/main/internal/sorter/sorter.go#L286-L295

We should do a better job of documenting this so it is less ambiguous for HTTPProxy users. Namely we should mention that specificity of route match conditions determine the order that matches will occur:

Notes:

AHB102 commented 11 months ago

I am new to open source, can I start contributing from this issue?

Garvit-77 commented 1 week ago

@sunjayBhatia Could you assign this issue i would like to work on it.