Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Eventing cronjob-source for Cloudevents #1006

Merged
merged 1 commit into from
Mar 15, 2019
Merged
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
19 changes: 13 additions & 6 deletions eventing/samples/cronjob-source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,19 @@ kubectl logs -l serving.knative.dev/service=message-dumper -c user-container --s

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

```json
{
"ID": "1543616460000180552-203",
"EventTime": "2018-11-30T22:21:00.000186721Z",
"Body": "{\"message\": \"Hello world!\"}"
}
```
2019/03/14 14:28:06 Message Dumper received a message: POST / HTTP/1.1
Host: message-dumper.default.svc.cluster.local
Transfer-Encoding: chunked
Accept-Encoding: gzip
Ce-Cloudeventsversion: 0.1
Copy link
Contributor

Choose a reason for hiding this comment

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

BTW: In the next release it will use 0.2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the heads-up.

Copy link
Member

Choose a reason for hiding this comment

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

I should dig out my code to switch this from something which dumps HTTP to something which dumps CloudEvents, since I think we want people talking about attributes/body, rather than HTTP framing.

But, this is correct at the moment, so let's get it in.

Ce-Eventid: 9790bf44-914a-4e66-af59-b43c06ccb73b
Ce-Eventtime: 2019-03-14T14:28:00.005163309Z
Ce-Eventtype: dev.knative.cronjob.event
Ce-Source: CronJob
...

{"message":"Hello world!"}
```

You can also use [`kail`](https://github.com/boz/kail) instead of `kubectl logs`
Expand Down