forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gateway: Make Header matching deterministic
[upstream commit 152b439] This commit is to make sure that header matching rules are sorted in a deterministic way, so that the behavior is predictable in envoy. The main changes are as per below: - Process http routes based on order from spec instead of random order from map. - Use sort.Stable to reverse the original order of equal elements. - Make sure that less(i, j) and less(j, i) return false if i-th and j-th elements are equal. Kindly note that envoy will just iteratively check rule one by one, if a match is found, subsequent rule will not be considered. Fixes: cilium#23999 Signed-off-by: Tam Mach <[email protected]>
- Loading branch information
1 parent
3c51319
commit ecb2250
Showing
4 changed files
with
577 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.