-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Delete HTTPRoute will trigger two push event loops, is this expected? #50998
Comments
it's because it triggers a gateway status change. Probably could be optimized to not push on status change (or, at least, that field in status) |
What about adding special handling to the Gateway API resource in https://github.com/istio/istio/blob/master/pilot/pkg/bootstrap/config_compare.go, just like what we have done with the istio's resource? I would like to submit this PR later if permitted. |
The thing that is tricky is we use pushes to trigger recomputing GW API resources. So while we don't use status at all for XDS generation, if we were to do something like |
As long as the status is produced by us, we don't need to watch the status change because the status is the reason for our processing. There may be two cases that we need to watch the status change:
|
Yeah but the part that writes the status and the part that reads the events doesn't really know who wrote it which makes it challenging. In Gateway API most objects (routes) can have multiple owners as well. Also, someone could just delete the status - we are expected to add it back |
The computing of Gateway API resources in the event loop can be split into two parts:
Since we want to add the status back, we can't skip part one for the status only change. But we can skip the second part. For example, we can add a As Gateway API depends on the status widely, it's worth skipping the xds generation for status only changes, which may be a lot. |
When deleting an HTTPRoute, two push event loops are triggered:
The first time, the delete event of HTTPRoute:
The second time, caused by the change of Gateway's status:
I discovered this in Istio 1.21, but since the
needsPush
in https://github.com/istio/istio/blob/master/pilot/pkg/bootstrap/config_compare.go is not changed in Istio 1.22, the same thing probably occurs. There is special rule to filter out Istio resource change, but not for the Gateway API resource.Delete a VirtualService won't trigger two push event loops. This behavior makes the deletion of HTTPRoute less efficient because the extra push will require extra recomputing. Is this behavior expected?
The text was updated successfully, but these errors were encountered: