knative / eventing

Event-driven application platform for Kubernetes
https://knative.dev/docs/eventing
Apache License 2.0
1.4k stars 590 forks source link

Proposal: Create an HTTP source #7477

Closed Cali0707 closed 3 weeks ago

Cali0707 commented 9 months ago

Problem Currently the Kafka source allows for conversion of kafka messages into CloudEvents for consumption with eventing. To make it easier for other legacy systems to integrate into Eventing, we should provide a really simple http source which exposes an http endpoint and converts all http requests it receives into valid CloudEvents before passing them into the system.

Persona: Which persona is this feature for?

People integrating eventing with older systems who don't want to change those systems Exit Criteria A source which can accept any http request and turn it into a valid CloudEvent

Time Estimate (optional): How many developer-days do you think this may take to resolve? 2

Additional context (optional) Add any other context about the feature request here.

Cali0707 commented 9 months ago

cc @pierDipi

Any thoughts?

pierDipi commented 9 months ago

This is similar to the @creydr feature extension about OAuthSource/Sink outlined here https://docs.google.com/document/d/1e7UgNTkL0Br5Da09Rg2ieVmhKJo4VXuBj-mHT9NCujY/edit#heading=h.a9ka3es7ol9v and I think it's useful to have.

It also helps with connecting other systems (including AWS eventbridge using https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html which would be another good goal to have in such source)

Cali0707 commented 9 months ago

A draft proposal is here

cc @aliok @creydr @matzew @pierDipi

professorabhay commented 7 months ago

Hey @Cali0707, I want to try this issue.

- httpsource
  - pkg
    - httpsource
      - server.go          // HTTP server implementation
      - handler.go         // Request handling logic
      - cloudevent.go      // CloudEvent generation logic
    - reconciler
      - httpsource.go      // Control plane logic

How far is it correct? I also need some guidance while working on it later on! 🙂

Cali0707 commented 6 months ago

Hi @professorabhay this isn't ready to be worked on, it is still in design. I appreciate the enthusiasm though, I'll reach out when it is ready!

Cali0707 commented 4 months ago

@pierDipi I've been thinking about this some more, and I'm wondering if maybe it would be better to have some sort of request-response proxy, so that if a user wants to call services connected by eventing like a normal http endpoint (and get a response with data instead of an ACK), they can just deploy this component.

WDYT?

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.