-
Notifications
You must be signed in to change notification settings - Fork 2.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
No endpoints could be generated from HTTPRoute for no reason #4439
Comments
Namespace discrepancy between |
We also stumbled about this. But we would really like to be able define gateways and route in different namespaces. @pkit Do you know if Is this not possible (rbac or whatever) or just not implemented as a feature? |
Gateways can have many different Listeners and Routes aren't required to match all of them. The logs would be really noisy if every non-match was logged when this is a commonly expected case. However, it is not expected for a Gateway to have accepted a Route AND for no Listener match to be found. This case is logged in the code you linked. external-dns/source/gateway.go Line 360 in fa17f9d
It also logs several other potential issues...
Gateways, Routes, and Services can cross namespace boundaries, but this must be explicitly allowed. It doesn't happen by default. In your case, @pkit, this is why the Gateway never attached to the Route. Please see the Gateway API's security model for more details (cc @jakoberpf). I think external-dns should do its best to convert the state of your cluster resources to DNS entries. I don't think it should try to determine the user's true intentions and diagnose misconfigurations of resource specifications. It just takes what it's given. That said, since it's already logging that no endpoints were found it could also specify that no Gateways were attached. |
@abursavich Thanks for elaborating that. Indeed providing the right namespace allow selectors on the gateway fixed my issue. |
Faced completely the same issue.
So on GW side it is HTTPS protocol, while with HTTPRoute there is no It is b/c of this function. There it says if protocols do not match between GW & HTTPRoute that route will be just skipped.
Regarding HTTPRoute the only protocol is the one defined by kubernetes service and when web based it is Can you advise which protocol is taken into consideration on HTTPRoute side, or perhaps it can be good enough if that condition would be omitted? Thanks. |
@zargor, HTTPRoute matches both HTTP and HTTPS protocols on the Listener. The first thing to look for is if the Route has been accepted by the Gateway. You can check the Route status for that. If the Gateway hasn't accepted the Route the Gateway won't serve the Route, so ExternalDNS won't match them together either. If the Route has been accepted by the Gateway, then there might be a problem with ExternalDNS. In either case, I'd be happy to help you debug your issue if you provide the full Gateway and HTTPRoute resources, including status. Feel free to obscure the IPs and hostnames if desired, but not so much that it changes the hostname matching semantics. |
Sure @abursavich , thanks, here are described gateway and httroute respectfully: Gateway:
HTTPRoute:
|
@zargor, the only thing that's jumping out at me is that the Gateway doesn't have any IP addresses in its status. The Gateway and the HTTPRoute are attached and ExternalDNS should agree, but it doesn't have any addresses to use for DNS records. https://github.com/kubernetes-sigs/external-dns/blob/master/docs/sources/gateway.md#targets |
In this case, it is about external NLB which comes with its own generic/default dns record. But yes, I suppose there can be an issue, since gateway |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
And that's it. There's no other logs that can shed any light on why it cannot be generated.
Looking at this atrocity I see a lot of places where it can go wrong, but zero debug logging. Nice!
The text was updated successfully, but these errors were encountered: