Skip to content

Commit 4eae98e

Browse files
committed
Align test document to match others
1 parent d87c28e commit 4eae98e

File tree

2 files changed

+42
-44
lines changed

2 files changed

+42
-44
lines changed

tests/graceful-recovery/graceful-recovery.md

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,29 @@ This document describes how we test graceful recovery from restarts on NGF.
55
<!-- TOC -->
66
- [Graceful recovery from restarts](#graceful-recovery-from-restarts)
77
- [Goal](#goal)
8-
- [Cluster Details](#cluster-details)
9-
- [Setup](#setup)
10-
- [Tests](#tests)
11-
- [Restart nginx-gateway container](#restart-nginx-gateway-container)
12-
- [Restart NGINX container](#restart-nginx-container)
13-
- [Restart Node with draining](#restart-node-with-draining)
14-
- [Restart Node without draining](#restart-node-without-draining)
8+
- [Test Environment](#test-environment)
9+
- [Steps](#steps)
10+
- [Setup](#setup)
11+
- [Run the tests](#run-the-tests)
12+
- [Restart nginx-gateway container](#restart-nginx-gateway-container)
13+
- [Restart NGINX container](#restart-nginx-container)
14+
- [Restart Node with draining](#restart-node-with-draining)
15+
- [Restart Node without draining](#restart-node-without-draining)
1516
<!-- TOC -->
1617

1718
## Goal
19+
1820
Ensure that NGF can recover gracefully from container failures without any user intervention.
1921

20-
## Cluster Details
22+
## Test Environment
23+
24+
- A Kubernetes cluster with 3 nodes on GKE
25+
- Node: e2-medium (2 vCPU, 4GB memory)
26+
- A Kind cluster
2127

22-
- GKE 1.27.3-gke.100
23-
- us-central1-c
24-
- Machine type of node is e2-medium
25-
- 3 nodes
28+
## Steps
2629

27-
## Setup
30+
### Setup
2831

2932
1. Setup GKE Cluster.
3033
2. Clone the repo and change into the nginx-gateway-fabric directory.
@@ -57,18 +60,18 @@ to deploy NGINX Gateway Fabric using manifests and expose it through a LoadBalan
5760
if the configuration and version were correctly updated.
5861
11. Send traffic through the example application and ensure it is working correctly.
5962

60-
## Tests
63+
### Run the tests
6164

62-
### Restart nginx-gateway container
65+
#### Restart nginx-gateway container
6366

6467
1. Ensure NGF and NGINX container logs are set up and traffic flows through the example application correctly.
65-
2. Insert ephemeral container in NGF Pod
68+
2. Insert ephemeral container in NGF Pod.
6669

6770
```console
6871
kubectl debug -it -n nginx-gateway <NGF_POD> --image=busybox:1.28 --target=nginx-gateway
6972
```
7073

71-
3. Kill nginx-gateway process through SIGKILL (Command should start with `/usr/bin/gateway`)
74+
3. Kill nginx-gateway process through a SIGKILL signal (Process command should start with `/usr/bin/gateway`).
7275

7376
```console
7477
kill -9 <nginx-gateway_PID>
@@ -80,30 +83,29 @@ if the configuration and version were correctly updated.
8083
7. Inside the NGINX container, check that `http.conf` was not changed and `config-version.conf` had its version set to `2`.
8184
8. Send traffic through the example application and ensure it is working correctly.
8285
9. Check that NGF can still process changes of resources.
83-
1. Delete the HTTPRoute resources
86+
1. Delete the HTTPRoute resources.
8487

8588
```console
8689
kubectl delete -f ../../examples/https-termination/cafe-routes.yaml
8790
```
8891

89-
2. Inside the terminal which is inside the NGINX container, check that `http.conf` and
90-
`config-version.conf` were correctly updated.
92+
2. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
9193
3. Send traffic through the example application using the updated resources and ensure traffic does not flow.
92-
4. Apply the HTTPRoute resources
94+
4. Apply the HTTPRoute resources.
9395

9496
```console
9597
kubectl apply -f ../../examples/https-termination/cafe-routes.yaml
9698
```
9799

98-
5. Inside the terminal which is inside the NGINX container, check that `http.conf` and
99-
`config-version.conf` were correctly updated.
100+
5. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
100101
6. Send traffic through the example application using the updated resources and ensure traffic flows correctly.
101102

102-
### Restart NGINX container
103+
#### Restart NGINX container
103104

104105
1. Ensure NGF and NGINX container logs are set up and traffic flows through the example application correctly.
105106
2. If the terminal inside the NGINX container is no longer running, Exec back into the NGINX container.
106-
3. Inside the NGINX container, kill the nginx-master process through SIGKILL (Command should start with `nginx: master process`).
107+
3. Inside the NGINX container, kill the nginx-master process through a SIGKILL signal
108+
(Process command should start with `nginx: master process`).
107109

108110
```console
109111
kill -9 <nginx-master_PID>
@@ -113,44 +115,42 @@ if the configuration and version were correctly updated.
113115
5. Open up the NGINX container logs and check for errors.
114116
6. Exec back into the NGINX container and check that `http.conf` and `config-version.conf` were not changed.
115117
7. Check that NGF can still process changes of resources.
116-
1. Delete the HTTPRoute resources
118+
1. Delete the HTTPRoute resources.
117119

118120
```console
119121
kubectl delete -f ../../examples/https-termination/cafe-routes.yaml
120122
```
121123

122-
2. Inside the terminal which is inside the NGINX container, check that `http.conf` and
123-
`config-version.conf` were correctly updated.
124+
2. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
124125
3. Send traffic through the example application using the updated resources and ensure traffic does not flow.
125-
4. Apply the HTTPRoute resources
126+
4. Apply the HTTPRoute resources.
126127

127128
```console
128129
kubectl apply -f ../../examples/https-termination/cafe-routes.yaml
129130
```
130131

131-
5. Inside the terminal which is inside the NGINX container, check that `http.conf` and
132-
`config-version.conf` were correctly updated.
132+
5. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
133133
6. Send traffic through the example application using the updated resources and ensure traffic flows correctly.
134134

135-
### Restart Node with draining
135+
#### Restart Node with draining
136136

137137
1. Switch over to a one-Node Kind cluster. Can run `make create-kind-cluster` from main directory.
138-
2. Run steps 4-12 of the Setup section above using [this guide]
139-
(https://github.com/nginxinc/nginx-gateway-fabric/blob/main/docs/running-on-kind.md) for running on Kind.
138+
2. Run steps 4-11 of the [Setup](#setup) section above using
139+
[this guide](https://github.com/nginxinc/nginx-gateway-fabric/blob/main/docs/running-on-kind.md) for running on Kind.
140140
3. Ensure NGF and NGINX container logs are set up and traffic flows through the example application correctly.
141-
4. Drain the Node of its resources
141+
4. Drain the Node of its resources.
142142

143143
```console
144144
kubectl drain kind-control-plane --ignore-daemonsets --delete-local-data
145145
```
146146

147-
5. Delete the Node
147+
5. Delete the Node.
148148

149149
```console
150150
kubectl delete node kind-control-plane
151151
```
152152

153-
6. Restart the Docker container
153+
6. Restart the Docker container.
154154

155155
```console
156156
docker restart kind-control-plane
@@ -160,25 +160,23 @@ if the configuration and version were correctly updated.
160160
8. Exec back into the NGINX container and check that `http.conf` and `config-version.conf` were not changed.
161161
9. Send traffic through the example application and ensure it is working correctly.
162162
10. Check that NGF can still process changes of resources.
163-
1. Delete the HTTPRoute resources
163+
1. Delete the HTTPRoute resources.
164164

165165
```console
166166
kubectl delete -f ../../examples/https-termination/cafe-routes.yaml
167167
```
168168

169-
2. Inside the terminal which is inside the NGINX container, check that `http.conf` and
170-
`config-version.conf` were correctly updated.
169+
2. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
171170
3. Send traffic through the example application using the updated resources and ensure traffic does not flow.
172-
4. Apply the HTTPRoute resources
171+
4. Apply the HTTPRoute resources.
173172

174173
```console
175174
kubectl apply -f ../../examples/https-termination/cafe-routes.yaml
176175
```
177176

178-
5. Inside the terminal which is inside the NGINX container, check that `http.conf` and
179-
`config-version.conf` were correctly updated.
177+
5. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
180178
6. Send traffic through the example application using the updated resources and ensure traffic flows correctly.
181179

182-
### Restart Node without draining
180+
#### Restart Node without draining
183181

184182
1. Repeat the above test but remove steps 4-5 which include draining and deleting the Node.

0 commit comments

Comments
 (0)