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

fix: GatewayReconciler will fall into a loop and cannot converge to stable state #7111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

potterhe
Copy link

What this PR does / why we need it:

GatewayReconciler will determine the change of ListenerStatus to decide whether to update Gateway.status. When Gateway.spec.listeners has many entries (greater than 10 and has a certain relationship with the number of HTTPRoutes), GatewayReconciler will fall into a loop and cannot converge to a stable state (updating status will trigger a new gateway reconciler event, and the new round of reconcile will always find differences). The reason here is that when using reflect.DeepEqual to compare two slice structs, the order of elements will affect the result, and Gateway.status.listeners[].conditions[].lastTransitionTime will always be assigned the current time in each round of reconcile, which should be excluded.

Which issue this PR fixes:

fixes #7031

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@potterhe potterhe requested a review from a team as a code owner February 12, 2025 08:08
@CLAassistant
Copy link

CLAassistant commented Feb 12, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@potterhe potterhe force-pushed the fix-gatewayapi-gateway-listenstatus branch from bd62240 to c9a9a1e Compare February 12, 2025 08:12
@potterhe potterhe force-pushed the fix-gatewayapi-gateway-listenstatus branch from c9a9a1e to c5f589e Compare February 12, 2025 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When gateway's listeners more than 8, httproute will be loop reconcile
2 participants