Trigger filtering based on cloud event headers

瀏覽次數:151 次
跳到第一則未讀訊息

Andrey Stelmashenko

未讀,
2022年2月23日 上午10:58:202022/2/23
收件者:Knative Users
Hi Community,

There is a filters feature of Triggers. Here is an example:
```
apiVersion: eventing.knative.dev/v1 kind: Trigger metadata: name: my-service-trigger spec: broker: default filter: attributes: type: dev.knative.foo.bar myextension: my-extension-value subscriber: ref: apiVersion: serving.knative.dev/v1 kind: Service name: my-service
```
Cloud events 'type' header is actually 'ce-type', how should I specify attributes 'type' or 'ce-type?'

Ahmed Abdalla

未讀,
2022年2月23日 上午11:15:432022/2/23
收件者:Andrey Stelmashenko、Knative Users
Hi Andrey

The Cloud Events Attribute is called "type" and that's what you should use. https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type

Thanks

--
Ahmed Abdalla


--
You received this message because you are subscribed to the Google Groups "Knative Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knative-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knative-users/2491e790-227f-4e4f-adb5-fa26b35b79f4n%40googlegroups.com.

Pierangelo Di Pilato

未讀,
2022年2月23日 上午11:36:042022/2/23
收件者:Andrey Stelmashenko、Knative Users
Hi Andrey,

it is any CloudEvent context attribute [1], in this case `type` (or
`myextension`).

[1]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#attribute-naming-convention
> --
> You received this message because you are subscribed to the Google Groups "Knative Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to knative-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/knative-users/2491e790-227f-4e4f-adb5-fa26b35b79f4n%40googlegroups.com.


--

Pierangelo Di Pilato
Software Engineer
Red Hat, Inc
https://www.redhat.com/

Andrey Stelmashenko

未讀,
2022年3月15日 中午12:28:022022/3/15
收件者:Knative Users
thank you for answers, I messed up with http headers.
回覆所有人
回覆作者
轉寄
0 則新訊息