简体   繁体   中英

Trigger Argo Workflow with webhook

I have a use case where I want to trigger a argo workflow when github push events occur. So far from what I understand the following would be the steps of my approach,

  • Create Github webhook
  • and then create the following in kube.netes

Event source(receives event from webhook and writes to event bus) -> Event Bus -> Sensor(listen to event from event bus & trigger the actions) -> trigger workflow template

Now, I have a few questions,

  1. Can multiple event sources use same event bus?
  2. How are we connecting event source to argo & to the github webhook? Are we creating a service & ingress from event source? Are there any examples or documentations available for this?

After spending a couple of days, I am still confused how to bridge the gaps between these pieces. I am a little new to the argocd, so it will be helpful if you could point out the gaps in my understanding.

After going through official documentation: https://argoproj.github.io/argo-events/eventsources/setup/github/

It explains that once Event source is created, it automatically creates a service and a pod. The name for the service is in {event-source-name}-eventsource-svc format.

We can then further create an ingress to access it from argo endpoint.

https://argoproj.github.io/argo-events/eventsources/naming/ This further explains how to create Event source correctly.

Finally, we can create a sensor file and define trigger conditions if any ( https://argoproj.github.io/argo-events/sensors/trigger-conditions/ ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM