-
Notifications
You must be signed in to change notification settings - Fork 1.3k
message_dumper to event_display #1126
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
| 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`: | ||
|
|
@@ -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`: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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=10mThe 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. |
||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
| --- | ||
|
|
||
|
|
@@ -28,5 +28,5 @@ spec: | |
| ref: | ||
| apiVersion: serving.knative.dev/v1alpha1 | ||
| kind: Service | ||
| name: message-dumper | ||
| name: event-display | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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`: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar comment on line 150. I would replace the entire kubectl logs -l serving.knative.dev/service=event-display -c user-container --since=10m |
||
|
|
@@ -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`: | ||
|
|
@@ -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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: | ||
|
|
@@ -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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I have that done globally. |
||
| namespace: default | ||
| spec: | ||
| runLatest: | ||
|
|
@@ -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 | ||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
service.yamlwill need to change in the same way.