Reputation: 484
According to the event_source doc in Argo workflow:
An EventSource defines the configurations required to consume events from external sources like AWS SNS, SQS, GCP PubSub, Webhooks, etc. It further transforms the events into the cloudevents and dispatches them over to the eventbus.
And for WorkflowEventBinding
, according to the event binding UI page message:
Workflow event bindings allow you to trigger workflows when a webhook event is received. For example, start a build on a Git commit, or start a machine learning pipeline from a remote system.
There is no clear definition from the WorkflowEventBinding doc:
Before the binding between an event and a workflow template, you must create the workflow template that you want to trigger. The following one takes in input the "message" parameter specified into the API call body, passed through the WorkflowEventBinding parameters section, and finally resolved here as the message of the whalesay image.
But according to the official examples, we should use EventSource for webhook:
# Info on GitHub Webhook: https://developer.github.com/v3/repos/hooks/#create-a-hook
apiVersion: argoproj.io/v1alpha1
kind: EventSource
So what is the concrete difference between an eventSource and a WorkflowEventBinding ? And when should we use them properly ?
Upvotes: 0
Views: 768
Reputation: 1
WorkFlowEventBinding is part of the Argo Workflow project. In this project, the way to trigger the workflow is by sending an API call for events - /api/v1/events/{namespace}/{discriminator}. However, this is kind of limiting if Specific EventSources are required.
Enter Argo events https://argoproj.github.io/argo-events/eventsources/setup/amqp/, this is a separate Argo project where you can define various Event Sources like from MQ, File, Webhook, etc. Each of the events generated from the EventSource can be captured in a Sensor which can listen to the specific Event and then trigger various actions, say workflows from Argo Workflow
https://argoproj.github.io/argo-events/sensors/triggers/argo-workflow/
Upvotes: 0