Skip to content

Commit 6d6dd4c

Browse files
authored
Issue289 (#290)
* previous changes were rephrased * some changes were rephrased Co-authored-by: ammbra <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>
1 parent b37ea97 commit 6d6dd4c

File tree

4 files changed

+45
-12
lines changed

4 files changed

+45
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
## Devlopment Site
2222

23-
If you like to try the latest development updates,check the [staging site](https://redhat-developer-docs.github.io/knative-tutorial-staging).
23+
If you like to try the latest development updates,check the [staging site](https://redhat-developer-docs.github.io/knative-tutorial-staging).
2424

2525
## Contributing
2626

documentation/modules/eventing/pages/eventing-trigger-broker.adoc

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,39 @@ include::eventing:partial$knative-objects.adoc[tag=knative-triggers]
126126
[#eventing-trigger-verification]
127127
== Verification
128128

129-
Pull out the broker URI:
129+
Pull out the subscriberUri for `eventhingaloha`:
130+
131+
[#eventing-triggers-verify-sub1]
132+
[.console-input]
133+
[source,bash,subs="+macros,+attributes"]
134+
----
135+
kubectl get trigger helloaloha -o jsonpath='{.status.subscriberUri}'
136+
----
137+
138+
The command should show the output as:
139+
[.console-output]
140+
[source,bash]
141+
----
142+
http://eventingaloha.knativetutorial.svc.cluster.local
143+
----
144+
145+
Pull out the subscriberUri for `eventhingbonjour`:
146+
147+
[#eventing-triggers-verify-sub2]
148+
[.console-input]
149+
[source,bash,subs="+macros,+attributes"]
150+
----
151+
kubectl get trigger hellobonjour -o jsonpath='{.status.subscriberUri}'
152+
----
153+
154+
The command should show the output as:
155+
[.console-output]
156+
[source,bash]
157+
----
158+
http://eventingbonjour.knativetutorial.svc.cluster.local
159+
----
160+
161+
As well as broker's subscriberUri:
130162

131163
[#eventing-triggers-verify-sub3]
132164
[.console-input]
@@ -142,7 +174,7 @@ The command should show the output as:
142174
http://broker-ingress.knative-eventing.svc.cluster.local/{tutorial-namespace}/default
143175
----
144176

145-
You should notice that the broker URI is a Kubernetes services with the suffix of `{tutorial-namespace}.svc.cluster.local`. This means they can be interacted with from another pod within the Kubernetes cluster.
177+
You should notice that the subscriberURIs are Kubernetes services with the suffix of `{tutorial-namespace}.svc.cluster.local`. This means they can be interacted with from another pod within the Kubernetes cluster.
146178

147179
Now that you have setup the Broker and Triggers you need to send in some test messages to see the behavior.
148180

@@ -196,11 +228,11 @@ Using the `curler` pod's shell, curl the broker URI for eventingaloha:
196228
[.console-input]
197229
[source,bash,subs="+macros,+attributes"]
198230
----
199-
curl -v "http://broker-ingress.{tutorial-namespace}.svc.cluster.local" \
231+
curl -v "http://broker-ingress.knative-eventing.svc.cluster.local/{tutorial-namespace}/default" \
200232
-X POST \
201233
-H "Ce-Id: say-hello" \
202234
-H "Ce-Specversion: 1.0" \
203-
-H "Ce-Type: greeting" \
235+
-H "Ce-Type: aloha" \
204236
-H "Ce-Source: mycurl" \
205237
-H "Content-Type: application/json" \
206238
-d '{"key":"from a curl"}'
@@ -230,11 +262,11 @@ Next, curl the broker URI for `eventingbonjour`:
230262
[.console-input]
231263
[source,bash,subs="+macros,+attributes"]
232264
----
233-
curl -v "http://broker-ingress.{tutorial-namespace}.svc.cluster.local" \
265+
curl -v "http://broker-ingress.knative-eventing.svc.cluster.local/{tutorial-namespace}/default" \
234266
-X POST \
235267
-H "Ce-Id: say-hello" \
236268
-H "Ce-Specversion: 1.0" \
237-
-H "Ce-Type: greeting" \
269+
-H "Ce-Type: bonjour" \
238270
-H "Ce-Source: mycurl" \
239271
-H "Content-Type: application/json" \
240272
-d '{"key":"from a curl"}'
@@ -256,13 +288,14 @@ The command above should show the following output:
256288
-----
257289
NAME READY STATUS AGE
258290
curler 1/1 Running 82s
259-
eventingaloha-1-deployment-6cdc888d9d-9xnnn 2/2 Running 53s
260291
eventingbonjour-1-deployment-fc7858b5b-s9prj 2/2 Running 5s
261292
-----
262293

263-
It was verified how each payload configured with either `type: aloha` or `type: bonjour` sent to the broker, then each trigger was able to filter each incoming message and send to the designated service set in the trigger.
294+
In the previous examples you sent to the broker a payload configured with `Ce-Type: aloha` or `Ce-Type: bonjour`.
295+
Each trigger filtered the incoming message and sent it to the configured Sink Service in case of a match.
264296

265-
You can experiment by using different type filters in the Subscription to see how the different subscribed services respond. `Filters` may use an link:https://cloudevents.io/[CloudEvent] attribute for its criteria.
297+
You can experiment by using different type filters in the Subscription to see how the different subscribed services respond.
298+
`Filters` may use an link:https://cloudevents.io/[CloudEvent] attribute for its criteria.
266299

267300
[#eventing-cleanup]
268301
== Cleanup

eventing/trigger-helloaloha.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ spec:
66
broker: default
77
filter:
88
attributes:
9-
type: greeting
9+
type: aloha
1010
subscriber:
1111
ref:
1212
apiVersion: serving.knative.dev/v1

eventing/trigger-hellobonjour.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ spec:
66
broker: default
77
filter:
88
attributes:
9-
type: greeting
9+
type: bonjour
1010
subscriber:
1111
ref:
1212
apiVersion: serving.knative.dev/v1

0 commit comments

Comments
 (0)