|
| 1 | +# Ingress, domains and proxies |
| 2 | + |
| 3 | +## Default configurations for domain and subdomains |
| 4 | +Cloud Harness makes it very easy to configure domains and proxies, by making |
| 5 | +an underlying assumption: |
| 6 | + |
| 7 | +- Applications share a main base domain (say ch.org) |
| 8 | +- Applications can define a subdomain (say myapp) |
| 9 | + |
| 10 | +The main domain is configured in the [root values file](../deployment-configuration/values-template.yaml) and |
| 11 | +it is usually overridden by the `harness-deployment` command, e.g. |
| 12 | + |
| 13 | +``` |
| 14 | +harness-deployment ... -d ch.org |
| 15 | +``` |
| 16 | + |
| 17 | +The subdomain is defined in the application's values.yaml file in |
| 18 | +harness.subdomain (see for instance the [samples application configuration](../applications/samples/deploy/values.yaml)) |
| 19 | + |
| 20 | +For instance on applications/myapp/deploy/values.yaml: |
| 21 | + |
| 22 | +```yaml |
| 23 | +harness: |
| 24 | + subdomain: myapp |
| 25 | +``` |
| 26 | +
|
| 27 | +The above configurations put together create an ingress configuration for https://myapp.ch.org and automatically configure letsencrypt to create and renew certificates. |
| 28 | +
|
| 29 | +Note: |
| 30 | +that the tls and letsencrypt configurations are enabled by default but should usually be disabled locally with |
| 31 | +
|
| 32 | +``` |
| 33 | +harness-deployment ... -dtls -l |
| 34 | +``` |
| 35 | + |
| 36 | +## Main application |
| 37 | + |
| 38 | +The "main" application is deployed on the base domain. |
| 39 | +In order to specify a main application, override the value in your `/deployment-configuration/values-template.yaml` file. |
| 40 | + |
| 41 | +Example |
| 42 | +```yaml |
| 43 | +mainapp: myapp |
| 44 | +``` |
| 45 | +This creates a reverse proxy to https://ch.org pointing to myapp |
| 46 | +
|
| 47 | +## Proxy configurations |
| 48 | +
|
| 49 | +Ingress is a reverse proxy and as such has some configurations to take into account. |
| 50 | +The most common configurations are connection timeouts and payload size. |
| 51 | +
|
| 52 | +To configure it, override the following values in your `deployment-configuration/values-template.yaml` file. |
| 53 | + |
| 54 | +```yaml |
| 55 | +proxy: |
| 56 | + timeout: |
| 57 | + # -- Timeout for proxy connections in seconds. |
| 58 | + send: 60 |
| 59 | + # -- Timeout for proxy responses in seconds. |
| 60 | + read: 60 |
| 61 | + keepalive: 60 |
| 62 | + payload: |
| 63 | + # -- Maximum size of payload in MB |
| 64 | + max: 250 |
| 65 | +``` |
| 66 | + |
| 67 | +Note that in the case that gatekeepers are enabled, the same configurations are applied |
| 68 | +to the gatekeepers, unless the application override them on `harness.proxy.*`. |
| 69 | +See also the [gatekeepers documentation](./accounts.md#secure-and-enpoint-with-the-gatekeeper). |
0 commit comments