|
20 | 20 | - [Upgrading the CRDs](#upgrading-the-crds)
|
21 | 21 | - [Upgrading the Chart from the OCI Registry](#upgrading-the-chart-from-the-oci-registry)
|
22 | 22 | - [Upgrading the Chart from the Sources](#upgrading-the-chart-from-the-sources)
|
23 |
| - - [Configure Delayed Termination for Zero Downtime Upgrades](#configure-delayed-termination-for-zero-downtime-upgrades) |
24 | 23 | - [Uninstalling the Chart](#uninstalling-the-chart)
|
25 | 24 | - [Uninstalling the Gateway Resources](#uninstalling-the-gateway-resources)
|
26 | 25 | - [Configuration](#configuration)
|
@@ -117,15 +116,10 @@ helm install ngf oci://ghcr.io/nginx/charts/nginx-gateway-fabric --create-namesp
|
117 | 116 |
|
118 | 117 | ## Upgrading the Chart
|
119 | 118 |
|
120 |
| -> [!NOTE] |
121 |
| -> |
122 |
| -> See [below](#configure-delayed-termination-for-zero-downtime-upgrades) for instructions on how to configure delayed |
123 |
| -> termination if required for zero downtime upgrades in your environment. |
124 |
| -
|
125 | 119 | ### Upgrading the Gateway Resources
|
126 | 120 |
|
127 | 121 | Before you upgrade a release, ensure the Gateway API resources are the correct version as supported by the NGINX
|
128 |
| -Gateway Fabric - [see the Technical Specifications](../../README.md#technical-specifications).: |
| 122 | +Gateway Fabric - [see the Technical Specifications](https://github.com/nginx/nginx-gateway-fabric/blob/main/README.md#technical-specifications).: |
129 | 123 |
|
130 | 124 | To upgrade the Gateway CRDs from [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run:
|
131 | 125 |
|
@@ -168,57 +162,6 @@ the release `ngf`, run:
|
168 | 162 | helm upgrade ngf . -n nginx-gateway
|
169 | 163 | ```
|
170 | 164 |
|
171 |
| -### Configure Delayed Termination for Zero Downtime Upgrades |
172 |
| - |
173 |
| -To achieve zero downtime upgrades (meaning clients will not see any interruption in traffic while a rolling upgrade is |
174 |
| -being performed on NGF), you may need to configure delayed termination on the NGF Pod, depending on your environment. |
175 |
| - |
176 |
| -> [!NOTE] |
177 |
| -> |
178 |
| -> When proxying Websocket or any long-lived connections, NGINX will not terminate until that connection is closed |
179 |
| -> by either the client or the backend. This means that unless all those connections are closed by clients/backends |
180 |
| -> before or during an upgrade, NGINX will not terminate, which means Kubernetes will kill NGINX. As a result, the |
181 |
| -> clients will see the connections abruptly closed and thus experience downtime. |
182 |
| -
|
183 |
| -1. Add `lifecycle` to both the nginx and the nginx-gateway container definition. To do so, update your `values.yaml` |
184 |
| - file to include the following (update the `sleep` values to what is required in your environment): |
185 |
| - |
186 |
| - ```yaml |
187 |
| - nginxGateway: |
188 |
| - <...> |
189 |
| - lifecycle: |
190 |
| - preStop: |
191 |
| - exec: |
192 |
| - command: |
193 |
| - - /usr/bin/gateway |
194 |
| - - sleep |
195 |
| - - --duration=40s # This flag is optional, the default is 30s |
196 |
| - |
197 |
| - nginx: |
198 |
| - <...> |
199 |
| - lifecycle: |
200 |
| - preStop: |
201 |
| - exec: |
202 |
| - command: |
203 |
| - - /bin/sleep |
204 |
| - - "40" |
205 |
| - ``` |
206 |
| -
|
207 |
| -2. Ensure the `terminationGracePeriodSeconds` matches or exceeds the `sleep` value from the `preStopHook` (the default |
208 |
| - is 30). This is to ensure Kubernetes does not terminate the Pod before the `preStopHook` is complete. To do so, |
209 |
| - update your `values.yaml` file to include the following (update the value to what is required in your environment): |
210 |
| - |
211 |
| - ```yaml |
212 |
| - terminationGracePeriodSeconds: 50 |
213 |
| - ``` |
214 |
| - |
215 |
| -> [!NOTE] |
216 |
| -> |
217 |
| -> More information on container lifecycle hooks can be found in the official |
218 |
| -> [kubernetes documentation](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) and a detailed |
219 |
| -> description of Pod termination behavior can be found in |
220 |
| -> [Termination of Pods](https://kubernetes.io/docs/concepts/workloads/Pods/Pod-lifecycle/#Pod-termination). |
221 |
| - |
222 | 165 | ## Uninstalling the Chart
|
223 | 166 |
|
224 | 167 | To uninstall/delete the release `ngf`:
|
|
0 commit comments