2

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 kubernetes

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.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
RandomUser
  • 93
  • 1
  • 8
  • Removed argocd tag. You can use EventSource and Workflow(Template) resources in a github repo, and have ArgoCD manage them, but that is tangential to the question being asked – OneCricketeer Mar 29 '23 at 02:19

1 Answers1

3

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/).

RandomUser
  • 93
  • 1
  • 8
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 26 '23 at 09:46