Skip to content

Commit 4d2c894

Browse files
authored
Deliver events to a particular path of a Trigger subscriber (#2760)
* Deliver events to a particular path of a Trigger subscriber Signed-off-by: Pierangelo Di Pilato <[email protected]> * Correct sentence Signed-off-by: Pierangelo Di Pilato <[email protected]>
1 parent 08e812c commit 4d2c894

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/eventing/triggers/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
A Trigger represents a desire to subscribe to events from a specific Broker.
22

3+
The `subscriber` value must be a [Destination](https://pkg.go.dev/knative.dev/pkg/apis/duck/v1#Destination).
4+
35
Simple example which will receive all the events from the given (`default`) broker and
46
deliver them to Knative Serving service `my-service`:
57

@@ -19,6 +21,26 @@ spec:
1921
EOF
2022
```
2123

24+
Simple example which will receive all the events from the given (`default`) broker and
25+
deliver them to the custom path `/my-custom-path` for the Kubernetes service `my-service`:
26+
27+
```shell
28+
kubectl create -f - <<EOF
29+
apiVersion: eventing.knative.dev/v1
30+
kind: Trigger
31+
metadata:
32+
name: my-service-trigger
33+
spec:
34+
broker: default
35+
subscriber:
36+
ref:
37+
apiVersion: v1
38+
kind: Service
39+
name: my-service
40+
uri: /my-custom-path
41+
EOF
42+
```
43+
2244
### Trigger Filtering
2345

2446
Exact match filtering on any number of CloudEvents attributes as well as

0 commit comments

Comments
 (0)