You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/ngf/how-to/data-plane-configuration.md
+31-58Lines changed: 31 additions & 58 deletions
Original file line number
Diff line number
Diff line change
@@ -200,46 +200,6 @@ EOF
200
200
201
201
---
202
202
203
-
### Attaching NginxProxy to GatewayClass
204
-
205
-
To attach the `ngf-proxy-config` NginxProxy to the GatewayClass:
206
-
207
-
```shell
208
-
kubectl edit gatewayclass nginx
209
-
```
210
-
211
-
This will open your default editor, allowing you to add the following to the `spec`:
212
-
213
-
```yaml
214
-
parametersRef:
215
-
group: gateway.nginx.org
216
-
kind: NginxProxy
217
-
name: ngf-proxy-config
218
-
namespace: default
219
-
```
220
-
221
-
After updating, you can check the status of the GatewayClass to see if the configuration is valid:
222
-
223
-
```shell
224
-
kubectl describe gatewayclass nginx
225
-
```
226
-
227
-
```text
228
-
...
229
-
Status:
230
-
Conditions:
231
-
...
232
-
Message: parametersRef resource is resolved
233
-
Observed Generation: 1
234
-
Reason: ResolvedRefs
235
-
Status: True
236
-
Type: ResolvedRefs
237
-
```
238
-
239
-
If everything is valid, the `ResolvedRefs` condition should be `True`. Otherwise, you will see an `InvalidParameters` condition in the status.
240
-
241
-
---
242
-
243
203
### Attaching NginxProxy to Gateway
244
204
245
205
To attach the `ngf-proxy-config` NginxProxy to a Gateway:
@@ -284,7 +244,7 @@ If everything is valid, the `ResolvedRefs` condition should be `True`. Otherwise
284
244
285
245
## Configure the data plane log level
286
246
287
-
You can use the `NginxProxy` resource at the GatewayClass level to dynamically configure the log level for all data plane instances.
247
+
You can use the `NginxProxy` resource to dynamically configure the log level.
288
248
289
249
The following command creates a basic `NginxProxy` configuration that sets the log level to `warn` instead of the default value of `info`:
290
250
@@ -300,7 +260,7 @@ spec:
300
260
EOF
301
261
```
302
262
303
-
Other log levels supported are debug, notice, error, crit, alert, emerg.
263
+
Other log levels supported are can be found in the `NginxProxy` [spec](#see-also).
304
264
305
265
{{< note >}}For `debug` logging to work, NGINX needs to be built with `--with-debug` or "in debug mode". NGINX Gateway Fabric can easily
306
266
be [run with NGINX in debug mode](#run-nginx-gateway-fabric-with-nginx-in-debug-mode) upon startup through the addition
@@ -379,27 +339,40 @@ EOF
379
339
380
340
## Configure infrastructure-related settings
381
341
382
-
You can configure deployment and service settings for all data plane instances by editing the `NginxProxy` resource at the GatewayClass level. These settings can also be specified under `nginx.` in the Helm values file.
383
-
384
-
Users can specify these settings for NGINX data plane deployments:
342
+
You can configure deployment and service settings for all data plane instances by editing the `NginxProxy` resource at the Gateway or GatewayClass level. These settings can also be specified under `nginx.` in the Helm values file. You can edit things such as replicas, pod scheduling options, container resource limits, extra volume mounts, service types and load balancer settings.
385
343
386
-
- _replicas_ specifies the number of data plane pod replicas..
387
-
- The `pod` section provides control over pod scheduling and lifecycle behavior. You can configure settings such as _terminationGracePeriodSeconds_, _tolerations_, _nodeSelector_, _affinity_, and _topologySpreadConstraints_. Use _extraVolumes_ to mount additional volumes, typically alongside container-level _extraVolumeMounts_.
388
-
- The `container` defines settings for the NGINX container itself., such as resource requests and limits using _resources_, and lifecycle hooks like preStop or postStart via _lifecycle_. You can also specify _extraVolumeMounts_ to mount additional volumes defined at the pod level.
344
+
The following command creates an `NginxProxy` resource with 2 replicas, sets `container.resources.requests` to 100m CPU and 128Mi memory, configures a 90 second `pod.terminationGracePeriodSeconds`, and sets the service type to `LoadBalancer` with IP `192.87.9.1` and AWS NLB annotation.
389
345
390
-
Users can specify these settings for NGINX data plane service in the `service` config:
391
-
392
-
- _type_ specifies the service type for the NGINX data plane. Allowed values are ClusterIP, NodePort, or LoadBalancer.
393
-
- _externalTrafficPolicy_ sets how external traffic is handled. `Local` preserves the client’s source IP.
394
-
- _annotations_ adds custom annotations to the NGINX data plane service.
0 commit comments