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

HTTPRoute BacknedRefs validation and potentially inconsistent view when backend is removed. #3433

Open
dawid-nowak opened this issue Nov 4, 2024 · 3 comments

Comments

@dawid-nowak
Copy link

I think a following scenario would need to be validated with respect to HTTPRoute and BackendRefs. The documentation is very vague here what should happen here.

  1. We add a HTTPRoute with valid BackendRefs, everything is good and the tests are passing.
  2. We remove the backend/object referenced by BackendRefs. The route is now invalid but it will not be updated since we would need to register for notifications about the removal of the referenced object.
  3. Which leaves the gateway in an inconsistent state.

Alternatively, we should drop validation of BackendRefs. So then the conditions don't need to be updated and the gateway doesn't care if the backend exists or it doesn't exist.

@youngnick
Copy link
Contributor

It's expected that implementations watch the referenced backends for all HTTPRoutes and supported backend types, and rereconcile HTTPRoutes if there are changes, so the invalid route should be picked up when that rereconciliation occurs.

I guess this could probably be added to https://gateway-api.sigs.k8s.io/guides/implementers/ to clarify.

@dawid-nowak
Copy link
Author

Thanks, got it... If this expectation is as firm as it sounds, maybe it should be part of the standard/conformance process?

@dawid-nowak
Copy link
Author

Thinking about it further. If a service that BackendRef is referencing gets deleted i don't think we would get a notification on deletion unless we add a finalizer to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants