Skip to content

Commit afb60b1

Browse files
authored
Minor fixes in easy event source tutorial (#2512)
* Minor fixes in easy event source tutorial * Grammar fix
1 parent 9fc3056 commit afb60b1

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

docs/eventing/samples/writing-event-source-easy-way/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ FROM node:10
44
WORKDIR /usr/src/app
55

66
# Install app dependencies
7-
# A wildcard is used to ensure both package.json AND package-lock.json are copied
8-
# where available (npm@5+)
7+
# A wildcard is used to ensure both package.json AND package-lock.json
98
COPY package*.json ./
109

1110
RUN npm install

docs/eventing/samples/writing-event-source-easy-way/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
As stated in [tutorial on writing a Source with a Receive Adapter](../writing-receive-adapter-source/README.md), there are multiple ways to
44
create event sources. The way in that tutorial is to create an independent event source that has its own CRD.
55

6-
In this tutorial though, you will build an event source in Javascript and use it with
7-
[ContainerSource](../../../eventing/sources/README.md#meta-sources) and / or [SinkBinding](../../../eventing/sources/README.md#meta-sources).
6+
This tutorial provides a simpler mechanism to build an event source in Javascript and use it with
7+
[ContainerSource](../../../eventing/sources/README.md#meta-sources) and / or the [SinkBinding](../../../eventing/sources/README.md#meta-sources).
88

99
[ContainerSource](../../../eventing/sources/README.md#meta-sources) is an easy way to turn any dispatcher container into an Event Source.
1010
Similarly, another option is using [SinkBinding](../../../eventing/sources/README.md#meta-sources)
1111
which provides a framework for injecting environment variables into any Kubernetes resource which has a `spec.template` that looks like a Pod (aka PodSpecable).
1212

13-
Code for this tutorial is available [here](./).
13+
SinkBinding is a newer concept and it should be preferred over ContainerSource.
14+
15+
Code for this tutorial is available [here](https://github.com/knative/docs/tree/master/docs/eventing/samples/writing-event-source-easy-way).
1416

1517
# Bootstrapping
1618

@@ -131,7 +133,7 @@ EOS
131133

132134
Check the logs of the event display service. You will see a new message is pushed every second:
133135
```bash
134-
$ kubectl logs event-display-dpplv-deployment-67c9949cf9-bvjvk -c user-container
136+
$ kubectl logs -l serving.knative.dev/service=event-display -c user-container
135137

136138
☁️ cloudevents.Event
137139
Validation: valid
@@ -147,7 +149,7 @@ Data,
147149
}
148150
```
149151

150-
If you are interested in to see what is injected into the event source, check the logs of it:
152+
If you are interested in seeing what is injected into the event source as a `K_SINK`, you can check the logs:
151153
```bash
152154
$ kubectl logs test-heartbeats-deployment-7575c888c7-85w5t
153155

0 commit comments

Comments
 (0)