1
- # Enhancement Proposal-929: Data Plane Dynamic Configuration
1
+ # Enhancement Proposal-929: Data Plane Configuration
2
2
3
3
- Issue: https://github.com/nginxinc/nginx-kubernetes-gateway/issues/929
4
4
- Status: Implementable
5
5
6
6
## Summary
7
7
8
- This proposal is intended to contain the design for how to dynamically configure global settings for the data plane
8
+ This proposal is intended to contain the design for how to configure global settings for the data plane
9
9
of the NGINX Gateway Fabric (NGF) product. Similar to control plane configuration, we should be able to leverage
10
10
a custom resource definition to define data plane configuration, considering fields such as telemetry and
11
11
upstream zone size.
12
12
13
13
## Goals
14
14
15
- Define a CRD to dynamically configure various global settings for the NGF data plane. The initial configurable
15
+ Define a CRD to configure various global settings for the NGF data plane. The initial configurable
16
16
options will be for telemetry (tracing) and upstream zone size.
17
17
18
18
## Non-Goals
@@ -31,6 +31,8 @@ API is through a CRD.
31
31
The purpose of this CRD is to contain "global" configuration options for the data plane, and not focused on policy
32
32
per route or backend.
33
33
34
+ NGF will reload NGINX when configuration changes are made.
35
+
34
36
In this doc, the term "user" will refer to the cluster operator (the person who installs and manages NGF). The
35
37
cluster operator owns this CRD resource.
36
38
@@ -48,30 +50,31 @@ metadata:
48
50
name : nginx-proxy-config
49
51
namespace : nginx-gateway
50
52
spec :
51
- telemetry :
52
- exporters :
53
- otlp :
54
- endpoint : my-otel-collector.svc:4317
55
- interval : 5s
56
- batchSize : 512
57
- batchCount : 4
58
- upstreamZoneSize : 1024k
53
+ http :
54
+ upstreamZoneSize : 512k # default
55
+ telemetry :
56
+ tracing :
57
+ enabled : true # default false
58
+ endpoint : my-otel-collector.svc:4317 # required
59
+ interval : 5s # default
60
+ batchSize : 512 # default
61
+ batchCount : 4 # default
59
62
status :
60
63
conditions :
61
64
...
62
65
```
63
66
64
67
- The CRD would be Namespace-scoped.
65
68
- CRD is initialized and created when NGF is deployed, in the ` nginx-gateway ` Namespace.
66
- - CRD would be referenced in the [ ParametersReference] [ ref ]
67
- of the NGF GatewayClass .
69
+ - CRD would be referenced in the [ ParametersReference] [ ref ] of the NGF GatewayClass.
70
+ - Conditions are either ` Valid ` or ` Invalid ` if the configuration was properly set .
68
71
69
72
[ ref ] :https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.ParametersReference
70
73
71
74
## Use Cases
72
75
73
- The high level use case for dynamically changing settings in the NGF data plane is to allow users to alter
74
- behavior without the need for restarting NGF and experiencing downtime .
76
+ The high level use case is to configure options in the NGF data plane that are not currently configurable. The
77
+ CRD also allows for these to change without the need to restart the NGF Pod .
75
78
76
79
### Tracing
77
80
@@ -105,7 +108,7 @@ We need to ensure that any configurable fields that are exposed to a user are:
105
108
106
109
- Properly validated. This means that the fields should be the correct type (integer, string, etc.), have appropriate
107
110
length, and use regex patterns or enums to prevent any unwanted input. This will initially be done through
108
- OpenAPI schema validation. If necessary as the CRD evolves, CEL or webhooks could be used.
111
+ OpenAPI schema validation. If necessary as the CRD evolves, CEL or control plane validation could be used.
109
112
- Have a valid use case. The more fields we expose, the more attack vectors we create. We should only be exposing
110
113
fields that are genuinely useful for a user to change dynamically.
111
114
@@ -123,6 +126,10 @@ The NGF control plane could implement its own custom API server. However the ove
123
126
would include auth, validation, endpoints, and so on, would not be worth it due to the fact that the Kubernetes
124
127
API server already does all of these things for us.
125
128
129
+ - Policies CRD for granular control
130
+ Being that these are global settings, a user may have a need for more granular control, in other words, changing
131
+ the settings at a per-route or per-backend basis. A new Policy CRD could accomplish this in future work.
132
+
126
133
## References
127
134
128
135
- [ Kubernetes Custom Resources] ( https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/ )
0 commit comments