Skip to content
This repository was archived by the owner on May 27, 2019. It is now read-only.

Commit 8c0d07d

Browse files
committed
doc(config): add example to readme
Add examples for proxyLocations and proxyDomain to give guidance how to use them.
1 parent d079bac commit 8c0d07d

1 file changed

Lines changed: 36 additions & 2 deletions

File tree

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ _Note that Kubernetes annotation maps are all of Go type `map[string]string`. A
288288
| <a name="app-nginx-proxy-buffers-number"></a>routable application | service | [router.deis.io/nginx.proxyBuffers.number](#app-nginx-proxy-buffers-number) | `"8"` | `number` argument to the nginx `proxy_buffers` directive. This can be used to override the same option set globally on the router. |
289289
| <a name="app-nginx-proxy-buffers-size"></a>routable application | service | [router.deis.io/nginx.proxyBuffers.size](#app-nginx-proxy-buffers-size) | `"4k"` | `size` argument to the nginx `proxy_buffers` directive expressed in bytes (no suffix), kilobytes (suffixes `k` and `K`), or megabytes (suffixes `m` and `M`). This can be used to override the same option set globally on the router. |
290290
| <a name="app-nginx-proxy-buffers-busy-size"></a>routable application | service | [router.deis.io/nginx.proxyBuffers.busySize](#app-nginx-proxy-buffers-busy-size) | `"8k"` | nginx `proxy_busy_buffers_size` expressed in bytes (no suffix), kilobytes (suffixes `k` and `K`), or megabytes (suffixes `m` and `M`). This can be used to override the same option set globally on the router. |
291-
|<a name="app-proxy-locations"></a>routable application | service | [router.deis.io/proxyLocations](#app-proxy-locations) | N/A | A list of locations of this servide to plug-in into another service determined by `router.deis.io/proxyDomain` |
292-
|<a name="app-proxy-domain"></a>routable application | service | [router.deis.io/proxyDomain](#app-proxy-domain) | N/A | A reference to another service to plug-in `router.deis.io/proxyLocations` to |
291+
|<a name="app-proxy-locations"></a>routable application | service | [router.deis.io/proxyLocations](#app-proxy-locations) | N/A | A list of locations of this service to plug-in into another service determined by `router.deis.io/proxyDomain` (see example below) |
292+
|<a name="app-proxy-domain"></a>routable application | service | [router.deis.io/proxyDomain](#app-proxy-domain) | N/A | A reference to another service to plug-in `router.deis.io/proxyLocations` to (see example below) |
293293

294294
#### Annotations by example
295295

@@ -339,6 +339,40 @@ metadata:
339339
# ...
340340
```
341341

342+
##### proxy locations:
343+
344+
Service of the application where we want `/webhooks` path to be handled by another service
345+
```
346+
apiVersion: v1
347+
kind: Service
348+
metadata:
349+
name: app_with_overwritten_webhooks_location
350+
labels:
351+
router.deis.io/routable: "true"
352+
namespace: router-examples
353+
# ...
354+
annotations:
355+
router.deis.io/domains: app_with_overwritten_webhooks_location
356+
# ...
357+
```
358+
359+
Service of the application which should handle `/webhooks` path of the app above
360+
```
361+
apiVersion: v1
362+
kind: Service
363+
metadata:
364+
name: app_webhooks_location_handler
365+
labels:
366+
router.deis.io/routable: "true"
367+
namespace: router-examples
368+
# ...
369+
annotations:
370+
...
371+
router.deis.io/proxyDomain=app_with_overwritten_webhooks_location
372+
router.deis.io/proxyLocations=/webhooks
373+
# ...
374+
```
375+
342376
### <a name="ssl"></a>SSL
343377

344378
Router has support for HTTPS with the ability to perform SSL termination using certificates supplied via Kubernetes secrets. Just as router utilizes the Kubernetes API to discover routable services, router also uses the API to discover cert-bearing secrets. This allows the router to dynamically refresh and reload configuration whenever such a certificate is added, updated, or removed. There is never a need to explicitly restart the router.

0 commit comments

Comments
 (0)