Skip to content

Commit

Permalink
Document exposing EL with openshift route
Browse files Browse the repository at this point in the history
Added Openshift Route Doc for exposing eventlistener.
Also, modified command in existing document to get service name.
  • Loading branch information
khrm authored and tekton-robot committed Jan 16, 2020
1 parent d13a746 commit bc6916b
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions docs/exposing-eventlisteners.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Instructions for installing nginx Ingress on other Kubernetes services can be fo
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml
```
1. Find the service name expose by the GitHub service:
2. Find the service name expose by the Eventlistener service:
```sh
kubectl get el -o=jsonpath='{.status.configuration.generatedName} <EVENTLISTENR_NAME> '
kubectl get el <EVENTLISTENR_NAME> -o=jsonpath='{.status.configuration.generatedName}'
```
1. Create the Ingress resource. A sample Ingress is below. Check the docs [here](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/)
3. Create the Ingress resource. A sample Ingress is below. Check the docs [here](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/)
for a full range of configuration options.
```YAML
apiVersion: extensions/v1beta1
Expand All @@ -49,5 +49,25 @@ for a full range of configuration options.
servicePort: 8080
```

1. Try it out! Get the address of the Ingress by running `kubectl get ingress ingress-resource`
4. Try it out! Get the address of the Ingress by running `kubectl get ingress ingress-resource`
and noting the address field. You can `curl` this IP or setup a GitHub webhook to send events to it.

## Using Openshift Route

The following instructions have been tested on Openshift 4.2 cluster running version `v1.14.6+32dc4a0`.
Further information can be found [here](https://docs.okd.io/latest/architecture/networking/routes.html)

1. Find the service name expose by the Eventlistener service:
```sh
oc get el <EVENTLISTENR_NAME> -o=jsonpath='{.status.configuration.generatedName}'
```
2. Expose the service using openshift route:
```sh
oc expose svc/[el-listener] # REPLACE el-listener WITH YOUR SERVICE NAME FROM STEP 1
```
3. Get the address of the Openshift Route:
```sh
oc get route el-listener -o=jsonpath='{.spec.host}' # REPLACE el-listener WITH YOUR SERVICE NAME FROM STEP 1
```
4. Try it out! You can use the url received above to setup a GitHub webhook for receiving events or you can `curl` this url.

0 comments on commit bc6916b

Please sign in to comment.