Skip to content

Commit db5a4cb

Browse files
authored
Update formatting for names and output in docs (#869)
Ensure that Kubernetes names are properly capitalized. Also updated all console outputs to text formatting.
1 parent acb377a commit db5a4cb

File tree

11 files changed

+73
-75
lines changed

11 files changed

+73
-75
lines changed

conformance/provisioner/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ How to deploy:
3535
```shell
3636
kubectl get pods -n nginx-gateway
3737
```
38-
```console
38+
```text
3939
NAME READY STATUS RESTARTS AGE
4040
nginx-gateway-provisioner-6c9d9fdcb8-b2pf8 1/1 Running 0 11m
4141
```

docs/architecture.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ These containers are deployed in a single Pod as a Kubernetes Deployment. The in
8282

8383
The `nginx-gateway`, or the control plane, is a [Kubernetes controller][controller], written with
8484
the [controller-runtime][runtime] library. It watches Kubernetes objects (Services, Endpoints, Secrets, and Gateway API
85-
CRDs), translates them to nginx configuration, and configures NGINX. This configuration happens in two stages. First,
85+
CRDs), translates them to NGINX configuration, and configures NGINX. This configuration happens in two stages. First,
8686
NGINX configuration files are written to the NGINX configuration volume shared by the `nginx-gateway` and `nginx`
8787
containers. Next, the control plane reloads the NGINX process. This is possible because the two
8888
containers [share a process namespace][share], which allows the NKG process to send signals to the NGINX master process.
8989

90-
The diagram below provides a visual representation of the interactions between processes within the nginx and
91-
nginx-gateway containers, as well as external processes/entities. It showcases the connections and relationships between
90+
The diagram below provides a visual representation of the interactions between processes within the `nginx` and
91+
`nginx-gateway` containers, as well as external processes/entities. It showcases the connections and relationships between
9292
these components. For the sake of simplicity, the `busybox` init container is not depicted in the diagram.
9393

9494
![NKG pod](/docs/images/nkg-pod.png)

docs/developer/design-principles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ improve performance.
3535

3636
## Resilience
3737

38-
We design with resilience in mind. This includes gracefully handling failures, such as pod restarts or network
38+
We design with resilience in mind. This includes gracefully handling failures, such as Pod restarts or network
3939
interruptions, as well as leveraging Kubernetes features like health checks, readiness probes, and container restart
4040
policies.
4141

docs/installation.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ This guide walks you through how to install NGINX Kubernetes Gateway on a generi
1414

1515
```shell
1616
git clone https://github.com/nginxinc/nginx-kubernetes-gateway.git
17-
```
18-
```shell
1917
cd nginx-kubernetes-gateway
2018
```
2119

@@ -66,7 +64,7 @@ This guide walks you through how to install NGINX Kubernetes Gateway on a generi
6664
```shell
6765
kubectl get pods -n nginx-gateway
6866
```
69-
```console
67+
```text
7068
NAME READY STATUS RESTARTS AGE
7169
nginx-gateway-5d4f4c7db7-xk2kq 2/2 Running 0 112s
7270
```

docs/resource-validation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ with the following error:
5555
```shell
5656
kubectl apply -f coffee-route.yaml
5757
```
58-
```
58+
```text
5959
The HTTPRoute "coffee" is invalid: spec.hostnames[0]: Invalid value: "cafe.!@#$%example.com": spec.hostnames[0] in body should match '^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'
6060
```
6161

@@ -72,7 +72,7 @@ following error:
7272
```shell
7373
kubectl apply -f prod-gateway.yaml
7474
```
75-
```
75+
```text
7676
Error from server: error when creating "prod-gateway.yaml": admission webhook "validate.gateway.networking.k8s.io" denied the request: spec.listeners[1].hostname: Forbidden: should be empty for protocol TCP
7777
```
7878

@@ -91,7 +91,7 @@ hostname) with a Kubernetes event:
9191
```shell
9292
kubectl describe gateway prod-gateway
9393
```
94-
```
94+
```text
9595
. . .
9696
Events:
9797
Type Reason Age From Message
@@ -123,7 +123,7 @@ Below is an example of how NGK rejects an invalid resource. The validation error
123123
```shell
124124
kubectl describe httproutes.gateway.networking.k8s.io coffee
125125
```
126-
```
126+
```text
127127
. . .
128128
Status:
129129
Parents:

examples/advanced-routing/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Advanced Routing
22

33
In this example we will deploy NGINX Kubernetes Gateway and configure advanced routing rules for a simple cafe application.
4-
We will use `HTTPRoute` resources to route traffic to the cafe application based on a combination of the request method, headers, and query parameters.
4+
We will use HTTPRoute resources to route traffic to the cafe application based on a combination of the request method, headers, and query parameters.
55

66
The cafe application consists of four Services: `coffee-v1-svc`, `coffee-v2-svc`, `tea-svc`, and `tea-post-svc`. In the next section we will create the following routing rules for the cafe application:
77
- For the path `/coffee` route requests with the header `version` set to `v2` or with the query param `TEST` set to `v2` to `coffee-v2-svc`, and all other requests to `coffee-v1-svc`.
@@ -11,7 +11,7 @@ The cafe application consists of four Services: `coffee-v1-svc`, `coffee-v2-svc`
1111

1212
## 1. Deploy NGINX Kubernetes Gateway
1313

14-
1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Gateway.
14+
1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Kubernetes Gateway.
1515

1616
1. Save the public IP address of NGINX Kubernetes Gateway into a shell variable:
1717

@@ -33,12 +33,12 @@ The cafe application consists of four Services: `coffee-v1-svc`, `coffee-v2-svc`
3333
kubectl apply -f cafe.yaml
3434
```
3535

36-
1. Check that the Pods are running in the `default` namespace:
36+
1. Check that the Pods are running in the `default` Namespace:
3737

3838
```shell
3939
kubectl -n default get pods
4040
```
41-
```console
41+
```text
4242
NAME READY STATUS RESTARTS AGE
4343
coffee-v1-75869cf7ff-vlfpq 1/1 Running 0 17m
4444
coffee-v2-67499ff985-2k6cc 1/1 Running 0 17m
@@ -48,13 +48,13 @@ The cafe application consists of four Services: `coffee-v1-svc`, `coffee-v2-svc`
4848

4949
## 3. Configure Routing
5050

51-
1. Create the `Gateway`:
51+
1. Create the Gateway:
5252

5353
```shell
5454
kubectl apply -f gateway.yaml
5555
```
5656

57-
1. Create the `HTTPRoute` resources:
57+
1. Create the HTTPRoute resources:
5858

5959
```shell
6060
kubectl apply -f cafe-routes.yaml
@@ -71,7 +71,7 @@ Send a request with the header `version:v2` and confirm that the response comes
7171
```shell
7272
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/coffee -H "version:v2"
7373
```
74-
```
74+
```text
7575
Server address: 10.116.2.67:8080
7676
Server name: coffee-v2-67499ff985-gw6vt
7777
...
@@ -82,7 +82,7 @@ Send a request with the query parameter `TEST=v2` and confirm that the response
8282
```shell
8383
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/coffee?TEST=v2
8484
```
85-
```
85+
```text
8686
Server address: 10.116.2.67:8080
8787
Server name: coffee-v2-67499ff985-gw6vt
8888
...
@@ -93,7 +93,7 @@ Send a request without the header or the query parameter and confirm the respons
9393
```shell
9494
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/coffee
9595
```
96-
```
96+
```text
9797
Server address: 10.116.2.70:8080
9898
Server name: coffee-v1-75869cf7ff-vlfpq
9999
...
@@ -106,7 +106,7 @@ Send a POST request and confirm that the response comes from `tea-post-svc`:
106106
```shell
107107
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea -X POST
108108
```
109-
```
109+
```text
110110
Server address: 10.116.2.72:8080
111111
Server name: tea-post-648dfcdd6c-2rlqb
112112
...
@@ -117,7 +117,7 @@ Send a GET request and confirm that the response comes from `tea-svc`:
117117
```shell
118118
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea
119119
```
120-
```
120+
```text
121121
Server address: 10.116.3.30:8080
122122
Server name: tea-6fb46d899f-hjzwr
123123
...
@@ -130,7 +130,7 @@ Send a PUT request and confirm the 404 Not Found response:
130130
```shell
131131
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea -X PUT
132132
```
133-
```
133+
```text
134134
<html>
135135
<head><title>404 Not Found</title></head>
136136
<body>

examples/cafe-example/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Example
22

3-
In this example we deploy NGINX Kubernetes Gateway, a simple web application, and then configure NGINX Gateway to route traffic to that application using `HTTPRoute` resources.
3+
In this example we deploy NGINX Kubernetes Gateway, a simple web application, and then configure NGINX Kubernetes Gateway to route traffic to that application using HTTPRoute resources.
44

55
## Running the Example
66

77
## 1. Deploy NGINX Kubernetes Gateway
88

9-
1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Gateway.
9+
1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Kubernetes Gateway.
1010

1111
1. Save the public IP address of NGINX Kubernetes Gateway into a shell variable:
1212

@@ -28,26 +28,26 @@ In this example we deploy NGINX Kubernetes Gateway, a simple web application, an
2828
kubectl apply -f cafe.yaml
2929
```
3030

31-
1. Check that the Pods are running in the `default` namespace:
31+
1. Check that the Pods are running in the `default` Namespace:
3232

3333
```shell
3434
kubectl -n default get pods
3535
```
36-
```console
36+
```text
3737
NAME READY STATUS RESTARTS AGE
3838
coffee-6f4b79b975-2sb28 1/1 Running 0 12s
3939
tea-6fb46d899f-fm7zr 1/1 Running 0 12s
4040
```
4141

4242
## 3. Configure Routing
4343

44-
1. Create the `Gateway`:
44+
1. Create the Gateway:
4545

4646
```shell
4747
kubectl apply -f gateway.yaml
4848
```
4949

50-
1. Create the `HTTPRoute` resources:
50+
1. Create the HTTPRoute resources:
5151

5252
```shell
5353
kubectl apply -f cafe-routes.yaml
@@ -62,7 +62,7 @@ To get coffee:
6262
```shell
6363
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/coffee
6464
```
65-
```
65+
```text
6666
Server address: 10.12.0.18:80
6767
Server name: coffee-7586895968-r26zn
6868
```
@@ -72,7 +72,7 @@ To get tea:
7272
```shell
7373
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea
7474
```
75-
```
75+
```text
7676
Server address: 10.12.0.19:80
7777
Server name: tea-7cd44fcb4d-xfw2x
7878
```

examples/cross-namespace-routing/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ in a different namespace from our HTTPRoutes.
77

88
## 1. Deploy NGINX Kubernetes Gateway
99

10-
1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Gateway.
10+
1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Kubernetes Gateway.
1111

1212
1. Save the public IP address of NGINX Kubernetes Gateway into a shell variable:
1313

@@ -29,37 +29,37 @@ in a different namespace from our HTTPRoutes.
2929
kubectl apply -f cafe-ns-and-app.yaml
3030
```
3131

32-
1. Check that the Pods are running in the `cafe` namespace:
32+
1. Check that the Pods are running in the `cafe` Namespace:
3333

3434
```shell
3535
kubectl -n cafe get pods
3636
```
37-
```console
37+
```text
3838
NAME READY STATUS RESTARTS AGE
3939
coffee-6f4b79b975-2sb28 1/1 Running 0 12s
4040
tea-6fb46d899f-fm7zr 1/1 Running 0 12s
4141
```
4242

4343
## 3. Configure Routing
4444

45-
1. Create the `Gateway`:
45+
1. Create the Gateway:
4646

4747
```shell
4848
kubectl apply -f gateway.yaml
4949
```
5050

51-
1. Create the `HTTPRoute` resources:
51+
1. Create the HTTPRoute resources:
5252

5353
```shell
5454
kubectl apply -f cafe-routes.yaml
5555
```
56-
1. Create the `ReferenceGrant`:
56+
1. Create the ReferenceGrant:
5757

5858
```shell
5959
kubectl apply -f reference-grant.yaml
6060
```
61-
This ReferenceGrant allows all HTTPRoutes in the `default` namespace to reference all Services in the `cafe`
62-
namespace.
61+
This ReferenceGrant allows all HTTPRoutes in the `default` Namespace to reference all Services in the `cafe`
62+
Namespace.
6363

6464
## 4. Test the Application
6565

@@ -70,7 +70,7 @@ To get coffee:
7070
```shell
7171
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/coffee
7272
```
73-
```
73+
```text
7474
Server address: 10.12.0.18:80
7575
Server name: coffee-7586895968-r26zn
7676
```
@@ -80,7 +80,7 @@ To get tea:
8080
```shell
8181
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea
8282
```
83-
```
83+
```text
8484
Server address: 10.12.0.19:80
8585
Server name: tea-7cd44fcb4d-xfw2x
8686
```
@@ -98,7 +98,7 @@ Now, if we try to access the application over HTTP, we will get an internal serv
9898
```shell
9999
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea
100100
```
101-
```
101+
```text
102102
<html>
103103
<head><title>500 Internal Server Error</title></head>
104104
<body>
@@ -113,7 +113,7 @@ You can also check the conditions of the HTTPRoutes `coffee` and `tea` to verify
113113
```shell
114114
kubectl describe httproute coffee
115115
```
116-
```console
116+
```text
117117
Condtions:
118118
Message: Backend ref to Service cafe/coffee not permitted by any ReferenceGrant
119119
Observed Generation: 1
@@ -126,7 +126,7 @@ Condtions:
126126
```shell
127127
kubectl describe httproute tea
128128
```
129-
```console
129+
```text
130130
Condtions:
131131
Message: Backend ref to Service cafe/tea not permitted by any ReferenceGrant
132132
Observed Generation: 1

0 commit comments

Comments
 (0)