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

ingress/gateway-api: stable envoy listener filterchain sort-order #31572

Merged

Conversation

mhofstetter
Copy link
Member

Currently, while translating K8s Ingress or Gateway API resources into Envoy resources, the filterchains of the Listeners are in random order. This leads to situations (especially in combination with Shared Ingress) where the order of the filterchains isn't guaranteed - resulting in unnecessary reconciliations.

This PR introduces a stable sort order of the filterchains for the HTTP- and TLS listeners.

Currently, while translating K8s Ingress or Gateway API resources into Envoy resources,
the filterchain is in random order. This leads to situations (especially in combination
with Shared Ingress) where the order of the filterchains isn't guaranteed -
resulting in unnecessary reconciliations.

Therefore, this commit orders the filterchains within a Envoy Listener by the namespace
and name of the TLS secret. This makes the translation deterministic.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
Currently, while translating K8s Ingress or Gateway API resources into Envoy resources,
the filterchain for TLS listeners is in random order. This leads to situations (especially in combination
with Shared Ingress) where the order of the filterchains isn't guaranteed -
resulting in unnecessary reconciliations.

Therefore, this commit orders the filterchains within a Envoy Listener by the name of the backends.
This makes the translation deterministic.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter added kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium. area/servicemesh GH issues or PRs regarding servicemesh feature/k8s-gateway-api feature/k8s-ingress labels Mar 24, 2024
@mhofstetter
Copy link
Member Author

/test

@mhofstetter mhofstetter added the needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch label Mar 24, 2024
@mhofstetter mhofstetter marked this pull request as ready for review March 25, 2024 07:53
@mhofstetter mhofstetter requested a review from a team as a code owner March 25, 2024 07:53
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.

Awesome findings

@sayboras sayboras added this pull request to the merge queue Mar 25, 2024
Merged via the queue into cilium:main with commit 305ea74 Mar 25, 2024
63 checks passed
@sayboras sayboras mentioned this pull request Mar 26, 2024
3 tasks
@sayboras sayboras added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Mar 26, 2024
@mhofstetter mhofstetter deleted the pr/mhofstetter/ingress-cec-filterchain-order branch March 26, 2024 06:09
@github-actions github-actions bot added backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/servicemesh GH issues or PRs regarding servicemesh backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. feature/k8s-gateway-api feature/k8s-ingress kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants