Skip to content

Commit

Permalink
Addressed doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
savitaashture committed Feb 27, 2021
1 parent 822639f commit 8549250
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/eventlisteners.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ spec:
With the help of `kubernetesResource` user can specify [PodTemplateSpec](https://github.com/kubernetes/api/blob/master/core/v1/types.go#L3704).

#### CustomResource
`CustomResource` have one field which supports dynamic object
A `CustomResource` object has one field that supports dynamic objects.
* runtime.RawExtension

Here we will use a [Knative Service](https://knative.dev/docs/) as an example to demonstrate usage of `CustomResource`
Expand Down Expand Up @@ -293,10 +293,10 @@ spec:
cpu: "500m"
```

With the help of `CustomResource` user can specify any dynamic object which follows below Contract
With the help of `CustomResource` user can specify any dynamic object which adheres to the Contract described below.

##### Contract
For Knative or new custom should satisfy [WithPod{}](https://github.com/knative/pkg/blob/master/apis/duck/v1/podspec_types.go#L41)
For Knative or any new CRD should satisfy [WithPod{}](https://github.com/knative/pkg/blob/master/apis/duck/v1/podspec_types.go#L41)

**Spec**
```spec
Expand Down
8 changes: 4 additions & 4 deletions examples/custom-resource/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Creates an EventListener that listens for GitHub webhook events.

### Try it out locally:

1. To create the GitHub trigger and all related resources, run:
1. To create the custom resource trigger and all related resources, run:

```bash
kubectl apply -f examples/custom-resource/
```

1. Test by sending the sample payload.
1. Test by sending the sample payload:

```bash
curl -v \
Expand All @@ -21,14 +21,14 @@ Creates an EventListener that listens for GitHub webhook events.
http://localhost:8080
```

The response status code should be `201 Created`
The response status code is `201 Created`

[`HMAC`](https://www.freeformatter.com/hmac-generator.html) tool used to create X-Hub-Signature.

In [`HMAC`](https://www.freeformatter.com/hmac-generator.html) `string` is the *body payload ex:* `{"action": "opened", "pull_request":{"head":{"sha": "28911bbb5a3e2ea034daf1f6be0a822d50e31e73"}},"repository":{"clone_url": "https://github.com/tektoncd/triggers.git"}}`
and `secretKey` is the *given secretToken ex:* `1234567`.

1. You should see a new TaskRun that got created:
1. You will see the newly created TaskRun:

```bash
kubectl get taskruns | grep github-run-
Expand Down

0 comments on commit 8549250

Please sign in to comment.