Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/eventing/samples/cronjob-source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Service that dumps incoming messages to its log.
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: message-dumper
name: event-display
spec:
runLatest:
configuration:
revisionTemplate:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the name above (on line 20) be updated from message-dumper to something like event-display? @Harwayne Would that impact the rest of the code for the samples?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. service.yaml will need to change in the same way.

spec:
container:
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/message_dumper
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display
```

Use following command to create the service from `service.yaml`:
Expand All @@ -51,7 +51,7 @@ spec:
sink:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: message-dumper
name: event-display
```

Use following command to create the event source from `cronjob-source.yaml`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't seem to comment on line 69.

The 'Verify' command should be:

kubectl logs -l serving.knative.dev/service=event-display -c user-container --since=10m

The output text will also be a bit different, but I don't know exactly what it will look like right now. We can probably leave the existing text for the time being.

Expand All @@ -66,14 +66,14 @@ We will verify that the message was sent to the Knative eventing system by
looking at message dumper logs.

```shell
kubectl logs -l serving.knative.dev/service=message-dumper -c user-container --since=10m
kubectl logs -l serving.knative.dev/service=event-display -c user-container --since=10m
```

You should see log lines showing the request headers and body from the source:

```
2019/03/14 14:28:06 Message Dumper received a message: POST / HTTP/1.1
Host: message-dumper.default.svc.cluster.local
Host: event-display.default.svc.cluster.local
Transfer-Encoding: chunked
Accept-Encoding: gzip
Ce-Cloudeventsversion: 0.1
Expand All @@ -90,7 +90,7 @@ You can also use [`kail`](https://github.com/boz/kail) instead of `kubectl logs`
to tail the logs of the subscriber.

```shell
kail -l serving.knative.dev/service=message-dumper -c user-container --since=10m
kail -l serving.knative.dev/service=event-display -c user-container --since=10m
```

### Cleanup
Expand Down
4 changes: 2 additions & 2 deletions docs/eventing/samples/cronjob-source/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: message-dumper
name: event-display
spec:
runLatest:
configuration:
revisionTemplate:
spec:
container:
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/message_dumper
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display
4 changes: 2 additions & 2 deletions docs/eventing/samples/gcp-pubsub-source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ not, then you will need to look downstream yourself.
- You can check the status of the downstream pods with:

```shell
kubectl get pods --selector serving.knative.dev/service=message-dumper
kubectl get pods --selector serving.knative.dev/service=event-display
```

You should see at least one.

1. Inspect the logs of the subscriber:

```shell
kubectl logs --selector serving.knative.dev/service=message-dumper -c user-container
kubectl logs --selector serving.knative.dev/service=event-display -c user-container
```

You should see log lines similar to:
Expand Down
8 changes: 4 additions & 4 deletions docs/eventing/samples/gcp-pubsub-source/trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: message-dumper
name: event-display
spec:
runLatest:
configuration:
revisionTemplate:
spec:
container:
# This corresponds to
# https://github.com/knative/eventing-sources/blob/release-0.3/cmd/message_dumper/dumper.go
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/message_dumper@sha256:8423232db7a7b4010c0cfbfaef95745efe962631af9b7456903825801a7893f7
# https://github.com/knative/eventing-sources/blob/release-0.5/cmd/event_display/main.go
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display@sha256:bf45b3eb1e7fc4cb63d6a5a6416cf696295484a7662e0cf9ccdf5c080542c21d

---

Expand All @@ -28,5 +28,5 @@ spec:
ref:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: message-dumper
name: event-display
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the previous comment, the readme needs an updated verification section. I think s/message-dumper/event-display/g would work.


10 changes: 5 additions & 5 deletions docs/eventing/samples/github-source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ defines this basic service.
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: github-message-dumper
name: github-event-display
spec:
runLatest:
configuration:
revisionTemplate:
spec:
container:
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/message_dumper
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display
```

Enter the following command to create the service from `service.yaml`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment on line 150.

I would replace the entire Create Events command with:

kubectl logs -l serving.knative.dev/service=event-display -c user-container --since=10m

Expand Down Expand Up @@ -122,7 +122,7 @@ spec:
sink:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: github-message-dumper
name: github-event-display
```

Then, apply that yaml using `kubectl`:
Expand All @@ -148,14 +148,14 @@ by looking at our message dumper function logs.

```shell
kubectl --namespace default get pods
kubectl --namespace default logs github-message-dumper-XXXX user-container
kubectl --namespace default logs github-event-display-XXXX user-container
```

You should log lines similar to:

```
2018/11/08 18:25:34 Message Dumper received a message: POST / HTTP/1.1
Host: github-message-dumper.knative-demo.svc.cluster.local
Host: github-event-display.knative-demo.svc.cluster.local
Accept-Encoding: gzip
Ce-Cloudeventsversion: 0.1
Ce-Eventid: a8d4cf20-e383-11e8-8069-46e3c8ad2b4d
Expand Down
2 changes: 1 addition & 1 deletion docs/eventing/samples/github-source/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ spec:
revisionTemplate:
spec:
container:
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/message_dumper
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display
2 changes: 1 addition & 1 deletion docs/eventing/samples/iot-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ see them in the subscriber.
1. Inspect the logs of the subscriber:

```shell
kubectl logs --selector serving.knative.dev/service=message-dumper -c user-container
kubectl logs --selector serving.knative.dev/service=event-display -c user-container
```

You should see something along the similar to:
Expand Down
8 changes: 4 additions & 4 deletions docs/eventing/samples/iot-core/trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ spec:
ref:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: message-dumper
name: event-display

---
# This is a very simple Knative Service that writes the input request to its log.

apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: message-dumper
name: event-display
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again the readme will have to be updated. s/message-dumper/event-display/g.

namespace: default
spec:
runLatest:
Expand All @@ -25,5 +25,5 @@ spec:
spec:
container:
# This corresponds to
# https://github.com/knative/eventing-sources/blob/release-0.3/cmd/message_dumper/dumper.go
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/message_dumper@sha256:8423232db7a7b4010c0cfbfaef95745efe962631af9b7456903825801a7893f7
# https://github.com/knative/eventing-sources/blob/release-0.5/cmd/event_display/main.go
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display@sha256:bf45b3eb1e7fc4cb63d6a5a6416cf696295484a7662e0cf9ccdf5c080542c21d
2 changes: 1 addition & 1 deletion docs/eventing/samples/kubernetes-event-source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ will need to look downstream yourself.

```shell
kubectl get pods
kubectl logs -l serving.knative.dev/service=message-dumper -c user-container
kubectl logs -l serving.knative.dev/service=event-display -c user-container
```

You should see log lines similar to:
Expand Down
8 changes: 4 additions & 4 deletions docs/eventing/samples/kubernetes-event-source/trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ spec:
ref:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: message-dumper
name: event-display

---
# This is a very simple Knative Service that writes the input request to its log.

apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: message-dumper
name: event-display
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again the readme will have to be updated. s/message-dumper/event-display/g.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I have that done globally.

namespace: default
spec:
runLatest:
Expand All @@ -25,5 +25,5 @@ spec:
spec:
container:
# This corresponds to
# https://github.com/knative/eventing-sources/blob/release-0.3/cmd/message_dumper/dumper.go
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/message_dumper@sha256:8423232db7a7b4010c0cfbfaef95745efe962631af9b7456903825801a7893f7
# https://github.com/knative/eventing-sources/blob/release-0.5/cmd/event_display/main.go
image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display@sha256:bf45b3eb1e7fc4cb63d6a5a6416cf696295484a7662e0cf9ccdf5c080542c21d