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
+33-62
Original file line number
Diff line number
Diff line change
@@ -198,45 +198,7 @@ spec:
198
198
EOF
199
199
```
200
200
201
-
---
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.
201
+
For a full list of configuration options that can be set, see the `NginxProxy spec` in the [API reference]({{< ref "/ngf/reference/api.md" >}}).
240
202
241
203
---
242
204
@@ -258,6 +220,8 @@ infrastructure:
258
220
name: ngf-proxy-config
259
221
```
260
222
223
+
{{< note >}} The `NginxProxy` resource must reside in the same namespace as the Gateway it is attached to. {{< /note >}}
224
+
261
225
After updating, you can check the status of the Gateway to see if the configuration is valid:
262
226
263
227
```shell
@@ -278,13 +242,11 @@ Status:
278
242
279
243
If everything is valid, the `ResolvedRefs` condition should be `True`. Otherwise, you will see an `InvalidParameters` condition in the status.
280
244
281
-
{{< note >}} The `NginxProxy` resource must reside in the same namespace as the Gateway it is attached to. {{< /note >}}
282
-
283
245
---
284
246
285
247
## Configure the data plane log level
286
248
287
-
You can use the `NginxProxy` resource at the GatewayClass level to dynamically configure the log level for all data plane instances.
249
+
You can use the `NginxProxy` resource to dynamically configure the log level.
288
250
289
251
The following command creates a basic `NginxProxy` configuration that sets the log level to `warn` instead of the default value of `info`:
290
252
@@ -300,7 +262,7 @@ spec:
300
262
EOF
301
263
```
302
264
303
-
Other log levels supported are debug, notice, error, crit, alert, emerg.
265
+
To view the full list of supported log levels, see the `NginxProxy spec` in the [API reference]({{< ref "/ngf/reference/api.md" >}}).
304
266
305
267
{{< note >}}For `debug` logging to work, NGINX needs to be built with `--with-debug` or "in debug mode". NGINX Gateway Fabric can easily
306
268
be [run with NGINX in debug mode](#run-nginx-gateway-fabric-with-nginx-in-debug-mode) upon startup through the addition
@@ -379,27 +341,36 @@ EOF
379
341
380
342
## Configure infrastructure-related settings
381
343
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:
385
-
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
+
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.
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.
395
-
396
-
The below fields can only be specified when the `service.type` is `LoadBalancer`:
397
-
- _loadBalancerIP_ specifies the static IP address of the load balancer.
398
-
- _loadBalancerClass_ specifies the class of the load balancer implementation this service belongs to.
399
-
- _loadBalancerSourceRanges_ specifies IP ranges (CIDR) that are allowed to access the load balancer.
346
+
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.
0 commit comments