Skip to content

Commit 3f5ff52

Browse files
committed
feat: add hugo meta, rewrite routing-traffic doc
1 parent cfce870 commit 3f5ff52

20 files changed

+160
-191
lines changed
File renamed without changes.
File renamed without changes.

docs/content/README.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/content/architecture.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
---
2+
title: "Architecture"
3+
description: "Learn about the architecture and design principles of NGINX Gateway Fabric."
4+
weight: 100
5+
toc: true
6+
docs: "DOCS-000"
7+
---
8+
19
# Architecture
210

3-
This document provides an overview of the architecture and design principles of the NGINX Gateway Fabric. The target
4-
audience includes the following groups:
11+
The target audience of this architecture document includes the following groups:
512

613
- *Cluster Operators* who would like to know how the software works and also better understand how it can fail.
714
- *Developers* who would like to [contribute][contribute] to the project.

docs/content/building-the-images.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
title: "Building the Images"
3+
description: "Learn how to build the NGINX Gateway Fabric and NGINX images."
4+
weight: 300
5+
toc: true
6+
docs: "DOCS-000"
7+
---
8+
19
# Building the Images
210

311
## Prerequisites

docs/content/cli-help.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# Command-line Help
2-
3-
This document describes the commands available in the `gateway` binary of the `nginx-gateway` container.
1+
---
2+
title: "Command line help"
3+
description: "Learn about the commands available in the gateway binary of the nginx-gateway container."
4+
weight: 400
5+
toc: true
6+
docs: "DOCS-000"
7+
---
48

59
## Static Mode
610

docs/content/control-plane-configuration.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# Control Plane Configuration
2-
3-
This document describes how to dynamically update the NGINX Gateway Fabric control plane configuration.
1+
---
2+
title: "Control Plane Configuration"
3+
description: "Learn how to dynamically update the NGINX Gateway Fabric control plane configuration."
4+
weight: 500
5+
toc: true
6+
docs: "DOCS-000"
7+
---
48

59
## Overview
610

docs/content/gateway-api-compatibility.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# Gateway API Compatibility
2-
3-
This document describes which Gateway API resources NGINX Gateway Fabric supports and the extent of that support.
1+
---
2+
title: "Gateway API Compatibility"
3+
description: "Learn which Gateway API resources NGINX Gateway Fabric supports and the extent of that support."
4+
weight: 700
5+
toc: true
6+
docs: "DOCS-000"
7+
---
48

59
## Summary
610

docs/content/guides/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Guides"
2+
title: "How-To Guides"
33
description:
44
linkTitle: "Guides"
55
menu:

docs/content/guides/advanced-routing.md

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@ toc: true
66
docs: "DOCS-000"
77
---
88

9-
In this guide we will configure advanced routing rules for multiple applications. These rules will showcase request
10-
matching by path, headers, query parameters, and method. For an introduction to exposing your application, it is
11-
recommended to go through the [basic guide]({{< relref "/guides/routing-traffic-to-your-app.md" >}}) first.
9+
In this guide we will configure advanced routing rules for multiple applications. These rules will showcase request matching by path, headers, query parameters, and method. For an introduction to exposing your application, we recommend that you go through the [basic guide]({{< relref "/guides/routing-traffic-to-your-app.md" >}}) first.
1210

1311
The following image shows the traffic flow that we will be creating with these rules.
1412

1513
![Traffic Flow Diagram](/img/advanced-routing.png)
1614

17-
The goal is to create a set of rules that will result in client requests being sent to specific backends based on
18-
the request attributes. In this diagram, we have two versions of the `coffee` service. Traffic for v1 needs to be
19-
directed to the old application, while traffic for v2 needs to be directed towards the new application. We also
20-
have two `tea` services, one that handles GET operations and one that handles POST operations. Both the `tea`
21-
and `coffee` applications share the same Gateway.
15+
The goal is to create a set of rules that will result in client requests being sent to specific backends based on the request attributes. In this diagram, we have two versions of the `coffee` service. Traffic for v1 needs to be directed to the old application, while traffic for v2 needs to be directed towards the new application. We also have two `tea` services, one that handles GET operations and one that handles POST operations. Both the `tea` and `coffee` applications share the same Gateway.
2216

2317
## Prerequisites
2418

@@ -45,8 +39,7 @@ kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric
4539

4640
### Deploy the Gateway API Resources for the Coffee Applications
4741

48-
The [Gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/) resource is typically deployed by the
49-
[cluster operator](https://gateway-api.sigs.k8s.io/concepts/roles-and-personas/#roles-and-personas_1). To deploy the Gateway:
42+
The [Gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/) resource is typically deployed by the [cluster operator](https://gateway-api.sigs.k8s.io/concepts/roles-and-personas/#roles-and-personas_1). To deploy the Gateway:
5043

5144
```yaml
5245
kubectl apply -f - <<EOF
@@ -65,8 +58,7 @@ EOF
6558

6659
This Gateway defines a single listener on port 80. Since no hostname is specified, this listener matches on all hostnames.
6760

68-
The [HTTPRoute](https://gateway-api.sigs.k8s.io/api-types/httproute/) is typically deployed by the
69-
[application developer](https://gateway-api.sigs.k8s.io/concepts/roles-and-personas/#roles-and-personas_1). To deploy the `coffee` HTTPRoute:
61+
The [HTTPRoute](https://gateway-api.sigs.k8s.io/api-types/httproute/) is typically deployed by the [application developer](https://gateway-api.sigs.k8s.io/concepts/roles-and-personas/#roles-and-personas_1). To deploy the `coffee` HTTPRoute:
7062

7163
```yaml
7264
kubectl apply -f - <<EOF
@@ -109,21 +101,19 @@ EOF
109101

110102
This HTTPRoute has a few important properties:
111103

112-
- The `parentRefs` references the Gateway resource that we created, and specifically defines the `http` listener
113-
to attach to, via the `sectionName` field.
104+
- The `parentRefs` references the Gateway resource that we created, and specifically defines the `http` listener to attach to, via the `sectionName` field.
114105
- `cafe.example.com` is the hostname that is matched for all requests to the backends defined in this HTTPRoute.
115-
- The first rule defines that all requests with the path prefix `/coffee` and no other matching conditions are sent
116-
to the `coffee-v1` Service.
117-
- The second rule defines two matching conditions. If *either* of these conditions match, requests are forwarded to
118-
the `coffee-v2` Service:
106+
- The first rule defines that all requests with the path prefix `/coffee` and no other matching conditions are sent to the `coffee-v1` Service.
107+
- The second rule defines two matching conditions. If *either* of these conditions match, requests are forwarded to the `coffee-v2` Service:
108+
119109
- Request with the path prefix `/coffee` and header `version=v2`
120110
- Request with the path prefix `/coffee` and the query parameter `TEST=v2`
121-
If you want both conditions to be required, you can define headers and queryParams in the same match object.
111+
112+
If you want both conditions to be required, you can define headers and queryParams in the same match object.
122113

123114
### Send Traffic to Coffee
124115

125-
Using the external IP address and port for NGINX Gateway Fabric, we can send traffic to our coffee
126-
applications.
116+
Using the external IP address and port for NGINX Gateway Fabric, we can send traffic to our coffee applications.
127117

128118
{{< note >}}If you have a DNS record allocated for `cafe.example.com`, you can send the request directly to that hostname, without needing to resolve.{{< /note >}}
129119

@@ -138,8 +128,7 @@ Server address: 10.244.0.9:8080
138128
Server name: coffee-v2-68bd55f798-s9z5q
139129
```
140130

141-
If we want our request to be routed to `coffee-v2`, then we need to meet the defined conditions. We can include
142-
a header:
131+
If we want our request to be routed to `coffee-v2`, then we need to meet the defined conditions. We can include a header:
143132

144133
```shell
145134
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/coffee -H "version:v2"
@@ -160,8 +149,7 @@ Server name: coffee-v2-68bd55f798-s9z5q
160149

161150
## Tea Applications
162151

163-
Let's deploy a different set of applications now called `tea` and `tea-post`. These applications will
164-
have their own set of rules, but will still attach to the same Gateway listener as the `coffee` apps.
152+
Let's deploy a different set of applications now called `tea` and `tea-post`. These applications will have their own set of rules, but will still attach to the same Gateway listener as the `coffee` apps.
165153

166154
### Deploy the Tea Applications
167155

@@ -213,8 +201,7 @@ The properties of this HTTPRoute include:
213201

214202
### Send Traffic to Tea
215203

216-
Using the external IP address and port for NGINX Gateway Fabric, we can send traffic to our tea
217-
applications.
204+
Using the external IP address and port for NGINX Gateway Fabric, we can send traffic to our tea applications.
218205

219206
{{< note >}}If you have a DNS record allocated for `cafe.example.com`, you can send the request directly to that hostname, without needing to resolve.{{< /note >}}
220207

@@ -240,16 +227,14 @@ Server address: 10.244.0.7:8080
240227
Server name: tea-post-b59b8596b-g586r
241228
```
242229

243-
This request should receive a response from the `tea-post` Pod. Any other type of method, such as PATCH, will
244-
result in a `404 Not Found` response.
230+
This request should receive a response from the `tea-post` Pod. Any other type of method, such as PATCH, will result in a `404 Not Found` response.
245231

246232

247233
## Troubleshooting
248234

249235
If you have any issues while sending traffic, try the following to debug your configuration and setup:
250236

251-
- Make sure you set the shell variables $GW_IP and $GW_PORT to the public IP and port of the NGINX Gateway Fabric
252-
Service. Instructions for finding those values are [here](/docs/installation.md#expose-nginx-gateway-fabric).
237+
- Make sure you set the shell variables $GW_IP and $GW_PORT to the public IP and port of the NGINX Gateway Fabric Service. Instructions for finding those values are [here](/docs/installation.md#expose-nginx-gateway-fabric).
253238

254239
- Check the status of the Gateway:
255240

@@ -307,8 +292,7 @@ If you have any issues while sending traffic, try the following to debug your co
307292
Name: http
308293
```
309294

310-
Check that the conditions match and that the attached routes for the `http` listener equals 2. If it is less than
311-
2, there may be an issue with the routes.
295+
Check that the conditions match and that the attached routes for the `http` listener equals 2. If it is less than 2, there may be an issue with the routes.
312296

313297
- Check the status of the HTTPRoutes:
314298

0 commit comments

Comments
 (0)