-
Notifications
You must be signed in to change notification settings - Fork 803
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
I would like to route events to triggers based on the global event count. This way, one can for example "offload" 30% of events to a different trigger. The easiest way would be to expose argo_events_event_service_running_total metric as a variable I guess, or at least interduce some stateful counter() function available in triggers condition field.
Thanks
Describe the solution you'd like
Simple one:
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: aws-sqs
spec:
dependencies:
- name: test-dep
eventSourceName: aws-sqs
eventName: example
triggers:
- template:
name: workflow_foo
conditions: "counter() % 3 == 0"
- template:
name: workflow_bar
conditions: "counter() % 3 != 0"
with a weight field:
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: aws-sqs
spec:
dependencies:
- name: test-dep
eventSourceName: aws-sqs
eventName: example
triggers:
- template:
name: workflow_foo
weight: 30
- template:
name: workflow_bar
weight: 70
Describe alternatives you've considered
Do this before Argo Events
Additional context
Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request