Skip to content

Commit 9986439

Browse files
committed
Update ingress docs for all tenants
1 parent 10d07fc commit 9986439

File tree

2 files changed

+23
-42
lines changed

2 files changed

+23
-42
lines changed

docs/workloads/application/explanations/expose.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ What good is an application if no one can reach it?
99
NAIS tries to make it easy to expose your application to the correct audience.
1010
Your audience may be other applications within the same [environment](../../explanations/environment.md), or it may be humans or machines on the outside.
1111

12+
For each audience, there are different ways to expose your application:
13+
14+
- [Service discovery](#service-discovery) for applications within the same environment.
15+
- [Ingress](#ingress) for users and applications outside the environment.
16+
1217
## Service discovery
1318

1419
If your audience is other applications within the same environment, they can communicate with your application directly by using _service discovery_.
@@ -42,19 +47,25 @@ Compared to [ingresses](#ingress), using service discovery has several advantage
4247

4348
If your audiences consist of human users or other services outside the environment, you will have to expose your application by using an _ingress_.
4449

50+
```yaml
51+
spec:
52+
ingresses:
53+
- https://myapplication.example.com
54+
```
55+
4556
An ingress exposes a route for inbound traffic from outside the environment to your application.
4657
The domain of the URL controls which users and environments that your application is reachable from.
4758
4859
Your application may specify multiple ingresses, each using the same or different domains.
4960
50-
Ingresses may also include paths.
61+
Ingresses may also include a trailing path.
5162
This allows for routing traffic to only specific parts of your application, or as part of a shared domain between multiple applications.
5263
5364
:dart: Learn how to [expose your application with an ingress](../how-to/expose.md).
5465
5566
:books: See the [ingress reference](../reference/ingress.md) for technical details and options.
5667
57-
## Ingress redirects
68+
### Ingress redirects
5869
5970
In some cases, you may want to redirect traffic from one domain to another.
6071
This can be useful if you have changed the domain of your application, or if you want to redirect users from an old domain to a new one.

docs/workloads/application/reference/ingress.md

+10-40
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tags: [workloads, reference, ingress]
44

55
# Ingress reference
66

7-
This is the reference documentation for [ingresses](../explanations/expose.md#ingress) in NAIS.
7+
This is the reference documentation for [ingresses](../explanations/expose.md#ingress) in Nais.
88

99
Ingress is the only way to expose your application to the outside world, this is not the recommended way to communicate between applications running in the same environment. For that, you should use [service discovery](../explanations/expose.md#service-discovery).
1010

@@ -149,13 +149,16 @@ Percentage of `5xx` errors to the `myapp` application as a ratio of total reques
149149
)
150150
```
151151

152-
{% if tenant() == "nav" %}
153-
154152
## Ingress access logs
155153

156-
Request access logs from nginx ingress controller are automatically collected and stored in Kibana.
154+
Ingress access logs are enabled by default for all applications and accessible from [Grafana Log Explorer](https://grafana.<<tenant()>>.cloud.nais.io/a/grafana-lokiexplore-app/explore) by selecting the `nais-ingress` service.
155+
156+
From there you can use the Filter tab to search for logs from your application by using the `ingress_namespace`, `ingress_name` and `url_domain` labels.
157+
158+
{% if tenant() == "nav" %}
157159

158-
Here are pre-configured queries for the controller logs in the following clusters:
160+
Ingress logs for on-premise applications are available in Kibana.
161+
Here are pre-configured queries for ingress logs in the different environments:
159162

160163
| Kibana | Grafana Loki |
161164
| --------------------------- | ------------------------- |
@@ -168,43 +171,10 @@ Here are pre-configured queries for the controller logs in the following cluster
168171
[prod-gcp-kibana]: https://logs.adeo.no/app/discover#/view/1d10b410-3369-11ed-b3e8-d969437dd878?_g=()
169172
[dev-fss]: https://logs.adeo.no/app/discover#/view/e7562030-3368-11ed-b3e8-d969437dd878?_g=()
170173
[prod-fss]: https://logs.adeo.no/app/discover#/view/00c05220-3369-11ed-b3e8-d969437dd878?_g=()
171-
[dev-gcp-loki]: https://grafana.nav.cloud.nais.io/explore?schemaVersion=1&panes=%7B%224fy%22%3A%7B%22datasource%22%3A%22P7BE696147D279490%22%2C%22queries%22%3A%5B%7B%22refId%22%3A%22A%22%2C%22expr%22%3A%22%7Bnamespace%3D%5C%22nais-system%5C%22%2C+app%3D%5C%22nais-ingress%5C%22%7D+%7C+json%22%2C%22queryType%22%3A%22range%22%2C%22datasource%22%3A%7B%22type%22%3A%22loki%22%2C%22uid%22%3A%22P7BE696147D279490%22%7D%2C%22editorMode%22%3A%22builder%22%7D%5D%2C%22range%22%3A%7B%22from%22%3A%22now-1h%22%2C%22to%22%3A%22now%22%7D%7D%7D&orgId=1
172-
[prod-gcp-loki]: https://grafana.nav.cloud.nais.io/explore?schemaVersion=1&panes=%7B%224fy%22%3A%7B%22datasource%22%3A%22PD969E40991D5C4A8%22%2C%22queries%22%3A%5B%7B%22refId%22%3A%22A%22%2C%22expr%22%3A%22%7Bnamespace%3D%5C%22nais-system%5C%22%2C+app%3D%5C%22nais-ingress%5C%22%7D+%7C+json%22%2C%22queryType%22%3A%22range%22%2C%22datasource%22%3A%7B%22type%22%3A%22loki%22%2C%22uid%22%3A%22PD969E40991D5C4A8%22%7D%2C%22editorMode%22%3A%22builder%22%7D%5D%2C%22range%22%3A%7B%22from%22%3A%22now-1h%22%2C%22to%22%3A%22now%22%7D%7D%7D&orgId=1
173-
174-
### Log fields description
175-
176-
| Field | Description |
177-
| ------------------- | ---------------------------------------------------------------------------------------------- |
178-
| `message` | HTTP request on the following format: "`method` `path` `httpVersion`" |
179-
| `response_code` | HTTP response code from nginx |
180-
| `x_upstream_name` | The application receiving the request on the following format "`namespace`-`app-name`-`port`" |
181-
| `x_upstream_status` | HTTP response code from the application |
182-
| `x_request_id` | Unique request ID used for correlating further requests from the application to other services |
183-
174+
[dev-gcp-loki]: https://grafana.nav.cloud.nais.io/d/ingress-logs/ingress-logs?var-env=dev
175+
[prod-gcp-loki]: https://grafana.nav.cloud.nais.io/d/ingress-logs/ingress-logs?var-env=prod
184176
{% endif %}
185177

186-
### Find _your_ access logs
187-
188-
In order to find your team's application access logs, you need to filter on the following fields:
189-
190-
* `AND x_upstream_name: my-namespace*` (replace `my-namespace` with your namespace)
191-
192-
If you want to filter on a specific application, you can add the following filter:
193-
194-
* `AND x_upstream_name: my-namespace-my-app*` (replace `my-namespace` with your namespace and `my-app` with your application name)
195-
196-
If you want to filter out specific HTTP response codes, you can add the following filter:
197-
198-
* `NOT response_code: 404` (replace `404` with the HTTP response code you want to filter out)
199-
200-
If you want to filter out multiple HTTP response codes, you can add the following filter:
201-
202-
* `NOT response_code: (404 or 503)` (replace `404` and `503` with the HTTP response codes you want to filter out)
203-
204-
If you want to find specific HTTP methods, you can add the following filter:
205-
206-
* `AND message: GET*` (replace `GET` with the HTTP method you want to filter out)
207-
208178
### Disable _your_ access logs
209179

210180
!!! note "Not reccomended"

0 commit comments

Comments
 (0)