Skip to content

Allow configuration of the namespace argo event sensors #1455

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

Open
dhpollack opened this issue Jun 15, 2023 · 2 comments · May be fixed by #1463
Open

Allow configuration of the namespace argo event sensors #1455

dhpollack opened this issue Jun 15, 2023 · 2 comments · May be fixed by #1463

Comments

@dhpollack
Copy link
Contributor

The current implementation of the workflow triggering allows one to specify the webhook url, which can theoretically be in any namespace. However, the sensors always get generated into the KUBERNETES_NAMESPACE, which is the same namespace as the workflow. We run our workflows in multiple namespaces, but have our eventbus, event sources, and sensors in a single namespace. The changes required to allow for this would be minimal:

  1. argo_client.py - change ._namespace in this function to ._sensor_namespace and set that to some config value or fall back to KUBERNETES_NAMESPACE
  2. argo_workflows.py - argo client - initialize this client into the desired sensor namespace
  3. argo_workflows.py - _compile_sensors - Change this valued to the sensor namespace

This would create a argo events sensor in one namespace (i.e. argo-events) and then trigger a workflow in the namespace that the workflow was ran in.

I could put together a PR pretty quickly if you are open to these changes. I successfully sent the argo event to a webhook in a separate namespace and triggered a workflow in the original namespace with these three changes.

@savingoyal
Copy link
Collaborator

A PR would be much appreciated!

@dhpollack dhpollack linked a pull request Jun 22, 2023 that will close this issue
@dhpollack
Copy link
Contributor Author

@savingoyal Here you go #1463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants