-
Notifications
You must be signed in to change notification settings - Fork 687
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
Ambassador should route any knative service endpoint #3224
Comments
Hi @maticue, Thanks for reporting this. It looks like our behavior indeed deviates from the Knative spec. Note that we're not working with a Knative Service/Revision here, we're rather working with an internal type, an Ingress under networking.internal.knative.dev/v1alpha1. I don't believe it's exposed in the docs anywhere as its consumption is intended for implementers of Knative gateways. Specifically the field in question is here: https://github.com/knative/serving/blob/130f8ace745397cbee16fb549664d91f08e8baa6/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_types.go#L212-L220 One unfortunate consequence of that spec description is that because we forward this on to Envoy the regex syntax doesn't exactly line up with what they ask for (Envoy regexes are these, which are not POSIX extended regexes). I'm not sure if there's anything we can practically do about that or if it even matters for most users (probably not). That said, it looks like the default for the path should definitely be Thanks again for tracking this down so helpfully! |
Actually, a second reading of this doc comment makes me wonder if we should be appending |
It looks like the Knative team views it as a prefix in their own Envoy shim, so I am going to go ahead and do the same: https://github.com/knative-sandbox/net-contour/blob/3df437f/pkg/reconciler/contour/resources/httpproxy.go#L189-L194 |
After talking to Flynn and the Knative folks, it sounds like literal prefix-matching is the right way to go. We went ahead and updated the documentation on the Knative side so we'll be in conformance with the spec once the fix to this ticket lands. You closed your original PR, @maticue, but I updated mine (#3232) to match yours. |
@kflynn With the release of 1.13, I think this issue can be closed. 👯 |
👍 |
Describe the bug
Per default knative services with endpoints different than
/
are not routed by ambassador.Let's suppose the following curl:
Ambassador logs show
No Route
value:This is because Ambassador default mapping for knative routing has:
which, based on ambassador documentation:
the scope is limited to only
/
.On the other hand, knative service definition does not allow to set up
path
attribute which is expected byknative.py
. Knative also creates a knative route + knative ingress when a knative service is created.We can workaround this creating another knative ingress manifest different from the default one created automatically by knative.
To Reproduce
Steps to reproduce the behavior:
/
. Like/hello
Expected behavior
If the backend service has a service running on
/hello
, I should see a 2xx HTTP code.Versions (please complete the following information):
Additional context
We could just set the
prefix_regex
option tofalse
per default. If more specific configuration is required, then users could create their own knative ingressThe text was updated successfully, but these errors were encountered: