Doc changes to githubsource for specifying API URL (#949)

* Doc changes to githubsource for specifying API URL

This commit introduces extra documentation to support the new
functionality on githubsource where you can optionally specify
the baseURL of the github api server - thus enabling the existing
githubsource to be used against both public github and github
enterprise.  See https://github.com/knative/eventing-sources/pull/219

* Relative URL and quotes
This commit is contained in:
D Appleby 2019-03-07 17:05:41 +00:00 committed by Knative Prow Robot
parent b88dddbd89
commit 74fa88ef49
3 changed files with 7 additions and 0 deletions

View File

@ -177,6 +177,7 @@ The GitHubSource fires a new event for selected
- `sink`:
[ObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#objectreference-v1-core)
A reference to the object that should receive events.
- `githubAPIURL`: `string` Optional field to specify the base URL for API requests. Defaults to the public GitHub API if not specified, but can be set to a domain endpoint to use with GitHub Enterprise, for example, `https://github.mycompany.com/api/v3/`. This base URL should always be specified with a trailing slash.
See the [GitHub Source](samples/github-source) example.

View File

@ -100,6 +100,10 @@ Source for a specific namespace. Be sure to replace the
`ownerAndRepository` value with a valid GitHub public repository owned
by your GitHub user.
If using GitHub enterprise you will need to add an additional githubAPIURL
field to the spec specifying your GitHub enterprise API endpoint, see
[here](../../README.md#githubsource)
```yaml
apiVersion: sources.eventing.knative.dev/v1alpha1
kind: GitHubSource

View File

@ -18,3 +18,5 @@ spec:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: github-message-dumper
# To use GitHub Enterprise you would need to add an entry for your githubAPIURL similar to the example below
# githubAPIURL: "https://github.mycompany.com/api/v3/"