Add a minimal-dependencies working example listening to k8s events#240
Conversation
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
|
For your reading pleasure (images work): https://github.com/evankanderson/docs/tree/1-10th-event/eventing/samples/k8s-events |
|
Let me see if I can excise the other commits that somehow leaked into my repo. |
grantr
left a comment
There was a problem hiding this comment.
/lgtm
/hold
This is really good. @evankanderson I made some optional suggestions; feel free to cancel the hold to get this in now.
FYI I didn't actually go through the steps, just read the instructions and yaml files.
| and a Docker Hub account configured (you'll use it for a container registry). | ||
| - The core Knative eventing tools installed. You can install them with: | ||
| ```shell | ||
| kubectl apply -f https://storage.googleapis.com/knative-releases/latest/release-eventing.yaml |
There was a problem hiding this comment.
This url is now https://storage.googleapis.com/knative-releases/eventing/latest/release.yaml
| `k8sevents` EventSource. | ||
|
|
||
| ```shell | ||
| kubectl apply -f https://storage.googleapis.com/knative-releases/latest/release-eventing-clusterbus-stub.yaml |
There was a problem hiding this comment.
This url is now https://storage.googleapis.com/knative-releases/eventing/latest/release-clusterbus-stub.yaml
|
|
||
| ```shell | ||
| kubectl apply -f https://storage.googleapis.com/knative-releases/latest/release-eventing-clusterbus-stub.yaml | ||
| kubectl apply -f https://storage.googleapis.com/knative-releases/latest/release-eventing-source-k8sevents.yaml |
There was a problem hiding this comment.
This url is now https://storage.googleapis.com/knative-releases/eventing/latest/release-source-k8sevents.yaml
| ## Build and deploy the sample | ||
|
|
||
| 1. Use Docker to build the sample code into a container. To build and push with | ||
| Docker Hub, run these commands replacing {username} with your Docker Hub |
There was a problem hiding this comment.
Add backticks around {username}
|
|
||
| 1. After the build has completed and the container is pushed to Docker Hub, you | ||
| can deploy the function into your cluster. **Ensure that the container image | ||
| value in function.yaml matches the container you built in the previous step.** |
There was a problem hiding this comment.
Add backticks around function.yaml. Maybe add an example of the image value?
| kubectl apply -f eventing/samples/k8s-events/flow.yaml | ||
| ``` | ||
|
|
||
| 1. You can read the function logs using Kibana. To access Kibana, you need to |
There was a problem hiding this comment.
Might be worth a footnote mentioning that Kibana isn't installed in the lite or no-mon installs and thatkubectl logs is an alternative.
| revisionTemplate: | ||
| spec: | ||
| container: | ||
| # Replace this image with your {username}/k8s-events container |
There was a problem hiding this comment.
Maybe add a TODO or some other callout to be clear that this requires action from the user.
| # Future revisions may opt to have a meaningful resource string | ||
| # that allows users to scope which objects they choose based on | ||
| # a templatized self-link. E.g. Configurations across all namespaces: | ||
| # /apis/serving.knative.dev/v1alpha1/namespaces/{namespace}/configurations/{config} |
There was a problem hiding this comment.
I'd probably remove all of these comment lines. They're distracting and won't have meaning to the new user.
f396ff5 to
2cb2a01
Compare
|
CLAs look good, thanks! |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: evankanderson, grantr The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
updated, thanks |
|
/lgtm |
|
/lgtm |
Fixes #203
Proposed Changes
eventing/README.md).depto vendor the dependencies offunction.gofor the moment. I'll send a PR to remove theglogusage from https://github.com/knative/eventing/tree/master/pkg/event later today, which may remove the need to usedepto avoid double declaration of thelog_dirflag.