Problem
The current solution involves setting the right attributes on both the source and the triggers. For example:
apiVersion: sources.knative.dev/v1alpha2
kind: PingSource
metadata:
name: ping-source-1
spec:
ceOverrides:
extensions:
sourceid: ping-source-1
schedule: "*/1 * * * *"
jsonData: '{"message": "Hello world! from 1"}'
sink:
ref:
apiVersion: eventing.knative.dev/v1
kind: Broker
name: broker
apiVersion: eventing.knative.dev/v1
kind: Trigger
metadata:
name: trigger-1
spec:
broker: broker
filter:
attributes:
sourceid: ping-source-1
subscriber:
ref:
apiVersion: v1
kind: Service
name: event-display-1
While this solution allows for a trigger to specify that they want events from a specific source, it is quite brittle as there is no way to statically check that the CE extension attribute sourceid matches.
This is a common scenario and Knative Eventing should have a good support for it.
Persona:
Which persona is this feature for?
Exit Criteria
A measurable (binary) test that would indicate that the problem has been resolved.
Time Estimate (optional):
How many developer-days do you think this may take to resolve?
1-2 days?
Additional context (optional)
Add any other context about the feature request here.
If you really want: #1381
Possible solutions:
- From 1381: well-behaved source populate
sourceid to be metadata.uid. Trigger supports refing sources.
- "brokered direct event delivery": the event source delivers events via a broker
Problem
The current solution involves setting the right attributes on both the source and the triggers. For example:
While this solution allows for a trigger to specify that they want events from a specific source, it is quite brittle as there is no way to statically check that the CE extension attribute
sourceidmatches.This is a common scenario and Knative Eventing should have a good support for it.
Persona:
Which persona is this feature for?
Exit Criteria
A measurable (binary) test that would indicate that the problem has been resolved.
Time Estimate (optional):
How many developer-days do you think this may take to resolve?
1-2 days?
Additional context (optional)
Add any other context about the feature request here.
If you really want: #1381
Possible solutions:
sourceidto bemetadata.uid. Trigger supports refing sources.