Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow Trigger Filter to filter on any Cloud Event Attribute (except data) #1610
Currently the TriggerFilter looks like this:
Time Estimate (optional):
Additional context (optional)
Seems like the design @mikehelmick mentions (filter by objectref to an importer object) makes the proposal in this PR (Trigger-specified attribute filters) unrelated functionality, because an objectref can't be an attribute filter.
Are you referring to mutual exclusion of filter types? In other words, will it be possible to specify multiple filter types, e.g. a Trigger with both
spec: filter: importer: ref: apiVersion: sources.knative.dev/v1alpha1 kind: AwesomeSource name: awesome-source-importer attributes: decorated: "true"
If this isn't possible, then we rely on importers to implement ALL filtering that a user might ever need, because the only option for an importer filter is "give me every event from this importer".
If this is possible, we need to be clear that filters are conjunctive. Maybe it's just me, but specifying multiple filters as a map looks confusing to me. It's hard to see where each filter begins and ends. A clearer way to specify this might be an array of oneofs:
spec: filters: - importer: ref: apiVersion: sources.knative.dev/v1alpha1 kind: AwesomeSource name: awesome-source-importer - attributes: decorated: "true"