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

KnativeService URL is based on the Integration name rather than the consumer endpoint name #2249

Open
astefanutti opened this issue Apr 30, 2021 · 4 comments
Labels
area/knative Related to Knative

Comments

@astefanutti
Copy link
Member

Currently, when deploying an Integration with a Knative Service endpoint, the created service URL depends on the Integration name, rather than the endpoint name. For example, when running kamel run -n test with:

from('knative:endpoint/knative2')
  .setBody().constant("Hello from knative2")

The Knative Service is accessible from http://test.ns.domain.

This causes confusion, as users may assume the service information is based on the endpoint information. The documentation also states that the name path parameter identifies the Knative resource:

https://github.com/apache/camel-k-runtime/blob/4f356e03bccbea2cb6a226aece6bce27ca1af9b8/components/camel-knative/camel-knative/src/main/docs/knative-component.adoc#path-parameters-2-parameters

Either it's possible to have the KnativeService URL based on the endpoint name, or we may better remove the path from our examples, as it has no meaning. This also raises the question of the support for multiple Knative consumer endpoints. Any conventions or limitations should be documented.

/cc @mmelko

@astefanutti astefanutti added the area/knative Related to Knative label Apr 30, 2021
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

@realMartinez
Copy link
Contributor

I will take a look at this

@christophd
Copy link
Contributor

I am not sure if knative:endpoint/knative2 should really affect the Knative service name and its base URL. I am fine with the integration name being the default Knative service name so it behaves similar to the arbitrary service trait.

Also, I think the endpoint name used in the Camel route represents something different. I would expect that the endpoint defines the resource subpath of the service so that http://test.ns.domain/knative2 requests get routed to the Camel route.

This would also play nice with multiple endpoints being set via the Camel routes, because requests get routed to the different endpoints via request paths.

We should add more testing to that first in order to see how this really behaves.

@realMartinez
Copy link
Contributor

As Christoph mentioned knative service URL is derived from integration name. This allows more intuitive naming if more endpoints are present in an integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/knative Related to Knative
Projects
None yet
Development

No branches or pull requests

4 participants