Skip to content

Commit 14dcc2b

Browse files
Format markdown (#1531)
Produced via: `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)` /assign @samodell
1 parent 31c0374 commit 14dcc2b

File tree

9 files changed

+346
-321
lines changed

9 files changed

+346
-321
lines changed

docs/eventing/samples/sequence/sequence-reply-to-event-display/README.md

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,28 @@ type: "docs"
88

99
## Overview
1010

11-
We are going to create the following logical configuration. We create a CronJobSource,
12-
feeding events to a (`Sequence`)[../../../sequence.md], then taking the output of that `Sequence` and
13-
displaying the resulting output.
11+
We are going to create the following logical configuration. We create a
12+
CronJobSource, feeding events to a (`Sequence`)[../../../sequence.md], then
13+
taking the output of that `Sequence` and displaying the resulting output.
1414

1515
![Logical Configuration](./sequence-reply-to-event-display.png)
1616

1717
## Prerequisites
1818

19-
For this example, we'll assume you have set up an `InMemoryChannel`
20-
as well as Knative Serving (for our functions). The examples use `default`
21-
namespace, again, if you want to deploy to another Namespace, you will need
22-
to modify the examples to reflect this.
19+
For this example, we'll assume you have set up an `InMemoryChannel` as well as
20+
Knative Serving (for our functions). The examples use `default` namespace,
21+
again, if you want to deploy to another Namespace, you will need to modify the
22+
examples to reflect this.
2323

2424
If you want to use different type of `Channel`, you will have to modify the
2525
`Sequence.Spec.ChannelTemplate` to create the appropriate Channel resources.
2626

27-
2827
## Setup
2928

3029
### Create the Knative Services
3130

32-
Change `default` below to create the steps in the Namespace where you want resources
33-
created.
31+
Change `default` below to create the steps in the Namespace where you want
32+
resources created.
3433

3534
```yaml
3635
apiVersion: serving.knative.dev/v1beta1
@@ -41,10 +40,10 @@ spec:
4140
template:
4241
spec:
4342
containers:
44-
- image: us.gcr.io/probable-summer-223122/cmd-03315b715ae8f3e08e3a9378df706fbb@sha256:2656f39a7fcb6afd9fc79e7a4e215d14d651dc674f38020d1d18c6f04b220700
45-
env:
46-
- name: STEP
47-
value: "0"
43+
- image: us.gcr.io/probable-summer-223122/cmd-03315b715ae8f3e08e3a9378df706fbb@sha256:2656f39a7fcb6afd9fc79e7a4e215d14d651dc674f38020d1d18c6f04b220700
44+
env:
45+
- name: STEP
46+
value: "0"
4847

4948
---
5049
apiVersion: serving.knative.dev/v1beta1
@@ -55,10 +54,10 @@ spec:
5554
template:
5655
spec:
5756
containers:
58-
- image: us.gcr.io/probable-summer-223122/cmd-03315b715ae8f3e08e3a9378df706fbb@sha256:2656f39a7fcb6afd9fc79e7a4e215d14d651dc674f38020d1d18c6f04b220700
59-
env:
60-
- name: STEP
61-
value: "1"
57+
- image: us.gcr.io/probable-summer-223122/cmd-03315b715ae8f3e08e3a9378df706fbb@sha256:2656f39a7fcb6afd9fc79e7a4e215d14d651dc674f38020d1d18c6f04b220700
58+
env:
59+
- name: STEP
60+
value: "1"
6261
---
6362
apiVersion: serving.knative.dev/v1beta1
6463
kind: Service
@@ -68,21 +67,22 @@ spec:
6867
template:
6968
spec:
7069
containers:
71-
- image: us.gcr.io/probable-summer-223122/cmd-03315b715ae8f3e08e3a9378df706fbb@sha256:2656f39a7fcb6afd9fc79e7a4e215d14d651dc674f38020d1d18c6f04b220700
72-
env:
73-
- name: STEP
74-
value: "2"
70+
- image: us.gcr.io/probable-summer-223122/cmd-03315b715ae8f3e08e3a9378df706fbb@sha256:2656f39a7fcb6afd9fc79e7a4e215d14d651dc674f38020d1d18c6f04b220700
71+
env:
72+
- name: STEP
73+
value: "2"
7574
---
76-
```
7775

76+
```
7877

7978
```shell
8079
kubectl -n default create -f ./steps.yaml
8180
```
8281

8382
### Create the Sequence
8483

85-
The `sequence.yaml` file contains the specifications for creating the Sequence. If you are using a different type of Channel, you need to change the
84+
The `sequence.yaml` file contains the specifications for creating the Sequence.
85+
If you are using a different type of Channel, you need to change the
8686
spec.channelTemplate to point to your desired Channel.
8787

8888
```yaml
@@ -95,31 +95,31 @@ spec:
9595
apiVersion: messaging.knative.dev/v1alpha1
9696
kind: InMemoryChannel
9797
steps:
98-
- ref:
99-
apiVersion: serving.knative.dev/v1beta1
100-
kind: Service
101-
name: first
102-
- ref:
103-
apiVersion: serving.knative.dev/v1beta1
104-
kind: Service
105-
name: second
106-
- ref:
107-
apiVersion: serving.knative.dev/v1beta1
108-
kind: Service
109-
name: third
98+
- ref:
99+
apiVersion: serving.knative.dev/v1beta1
100+
kind: Service
101+
name: first
102+
- ref:
103+
apiVersion: serving.knative.dev/v1beta1
104+
kind: Service
105+
name: second
106+
- ref:
107+
apiVersion: serving.knative.dev/v1beta1
108+
kind: Service
109+
name: third
110110
reply:
111111
kind: Service
112112
apiVersion: serving.knative.dev/v1beta1
113113
name: event-display
114114
```
115115
116-
Change `default` below to create the `Sequence` in the Namespace where you want the
117-
resources to be created.
116+
Change `default` below to create the `Sequence` in the Namespace where you want
117+
the resources to be created.
118+
118119
```shell
119120
kubectl -n default create -f ./sequence.yaml
120121
```
121122

122-
123123
### Create the Service displaying the events created by Sequence
124124

125125
```yaml
@@ -131,20 +131,20 @@ spec:
131131
template:
132132
spec:
133133
containers:
134-
- image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display
134+
- image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display
135135
```
136136

137-
Change `default` below to create the `Sequence` in the Namespace where you want your resources
138-
to be created.
137+
Change `default` below to create the `Sequence` in the Namespace where you want
138+
your resources to be created.
139139

140140
```shell
141141
kubectl -n default create -f ./event-display.yaml
142142
```
143143

144144
### Create the CronJobSource targeting the Sequence
145145

146-
This will create a CronJobSource which will send a CloudEvent with {"message": "Hello world!"} as
147-
the data payload every 2 minutes.
146+
This will create a CronJobSource which will send a CloudEvent with {"message":
147+
"Hello world!"} as the data payload every 2 minutes.
148148

149149
```yaml
150150
apiVersion: sources.eventing.knative.dev/v1alpha1
@@ -166,15 +166,15 @@ kubectl -n default create -f ./cron-source.yaml
166166

167167
### Inspecting the results
168168

169-
You can now see the final output by inspecting the logs of the event-display pods.
169+
You can now see the final output by inspecting the logs of the event-display
170+
pods.
170171

171172
```shell
172173
kubectl -n default get pods
173174
```
174175

175176
Then look at the logs for the event-display pod:
176177

177-
178178
```shell
179179
kubectl -n default logs -l serving.knative.dev/service=event-display -c user-container
180180
☁️ cloudevents.Event
@@ -193,5 +193,5 @@ Data,
193193
}
194194
```
195195

196-
And you can see that the initial Cron Source message ("Hello World!") has been appended to it by each
197-
of the steps in the Sequence.
196+
And you can see that the initial Cron Source message ("Hello World!") has been
197+
appended to it by each of the steps in the Sequence.

0 commit comments

Comments
 (0)