Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.15] Author backport of #31493 #31739

Conversation

mhofstetter
Copy link
Member

@mhofstetter mhofstetter commented Apr 3, 2024

Currently, while translating K8s Ingress or Gateway API resources into Envoy resources, the virtualhosts aren't sorted. This leads to situations (especially in combination with Shared Ingress) where the order of the virtual hosts isn't guaranteed.

Therefore, this commit orders the virtualhosts within a Envoy RouteConfiguration by their name. This influences the Envoy route matching process (https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/route_matching), but only by making it constant and not random.

Backport of #31493 (Original PR changed the virtual host order in unit-tests that aren't present on v1.15)

Once this PR is merged, a GitHub action will update the labels of these PRs:

 31493

Currently, while translating K8s Ingress or Gateway API resources into
Envoy resources, the virtualhosts aren't sorted. This leads to situations
(especially in combination with Shared Ingress) where the order of the virtual
hosts isn't guaranteed.

Therefore, this commit orders the virtualhosts within a Envoy RouteConfiguration
by their name. This influences the Envoy route matching process
(https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/route_matching),
but only by making it constant and not random.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter added kind/backports This PR provides functionality previously merged into master. backport/1.15 This PR represents a backport for Cilium 1.15.x of a PR that was merged to main. labels Apr 3, 2024
@mhofstetter
Copy link
Member Author

/test-backport-1.15

@mhofstetter mhofstetter marked this pull request as ready for review April 3, 2024 11:33
@mhofstetter mhofstetter requested a review from a team as a code owner April 3, 2024 11:33
Copy link
Member

@sayboras sayboras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks and lgtm ✔️

Copy link
Member

@julianwiedmann julianwiedmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Two process-related remarks:

  • for non-trivial backports, we typically state somewhere in the PR or patch (as backporter's notes) why the custom backport is needed, and what was altered. Here it looks like code was shuffled into different files between versions ...?
  • if you use the upstream-prs annotation in the PR description, you'll get management of the backport-done label for free :).

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 3, 2024
@julianwiedmann julianwiedmann merged commit 6c6acdb into cilium:v1.15 Apr 3, 2024
60 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/ingress-cec-virtualhost-sorted-1.15 branch April 3, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.15 This PR represents a backport for Cilium 1.15.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants