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

Add option to specify relative uri for service #301

Open
kgibm opened this issue Aug 22, 2023 · 5 comments
Open

Add option to specify relative uri for service #301

kgibm opened this issue Aug 22, 2023 · 5 comments
Labels
kind/feature-request kind/good-first-issue Denotes an issue ready for a new contributor. triage/accepted Issues which should be fixed (post-triage)

Comments

@kgibm
Copy link

kgibm commented Aug 22, 2023

Feature request

One useful addition would be a relative uri option when specifying a service sink.

Use case

It's very common for the CloudEvents endpoint to be at a URI other than /. KafkaSource supports uri in addition to ref:

uri: [...] Relative URIs are resolved using the base URI retrieved from Ref.

I had to use YAML instead:

apiVersion: sources.knative.dev/v1beta1
kind: KafkaSource
metadata:
  name: mysource
spec:
  bootstrapServers:
  - my-cluster-kafka-bootstrap.amq-streams-kafka.svc:9092
  sink:
    ref:
      apiVersion: serving.knative.dev/v1
      kind: Service
      name: myservice
    uri: "/api/cloudevents/mytopic"
  topics:
  - mytopic

UI Example

kn source kafka create mysource --servers my-cluster-kafka-bootstrap.amq-streams-kafka.svc:9092 --topics mytopic --sink myservice --uri /api/cloudevents/mytopic
@dsimansk dsimansk added kind/good-first-issue Denotes an issue ready for a new contributor. kind/feature-request triage/accepted Issues which should be fixed (post-triage) labels Aug 22, 2023
@dsimansk
Copy link
Contributor

Thanks for the proposal! Indeed this might have been overlooked as an option. We will aim to get it done for Knative 1.12.

@dsimansk
Copy link
Contributor

@Cali0707 @Leo6Leo FYI one of the issues we chatted about in the Slack thread. If you know about anyone interested to work on it, please feel free to share.

@Leo6Leo
Copy link

Leo6Leo commented Aug 25, 2023

/assign @taniaduggal

@knative-prow
Copy link

knative-prow bot commented Aug 25, 2023

@Leo6Leo: GitHub didn't allow me to assign the following users: taniaduggal.

Note that only knative-extensions members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @taniaduggal

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dsimansk
Copy link
Contributor

dsimansk commented Aug 28, 2023

@Leo6Leo you won't be able to assign issue to non-member of knative/knative-extensions orgs, per the bot's comment.

But it's fine even without a direct assignee on the issue. There's an indication of assignee at least. :)
PR can be still created and merged, given the contrib CLA is signed.

@taniaduggal happy to see new faces around! Please don't hesitate and let us know if you need any assistance or source code pointers to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request kind/good-first-issue Denotes an issue ready for a new contributor. triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

No branches or pull requests

3 participants