Skip to content

Commit 570487e

Browse files
committed
Code review feedback
1 parent f97792f commit 570487e

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

docs/proposals/data-plane-config.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Enhancement Proposal-929: Data Plane Dynamic Configuration
1+
# Enhancement Proposal-929: Data Plane Configuration
22

33
- Issue: https://github.com/nginxinc/nginx-kubernetes-gateway/issues/929
44
- Status: Implementable
55

66
## Summary
77

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
99
of the NGINX Gateway Fabric (NGF) product. Similar to control plane configuration, we should be able to leverage
1010
a custom resource definition to define data plane configuration, considering fields such as telemetry and
1111
upstream zone size.
1212

1313
## Goals
1414

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
1616
options will be for telemetry (tracing) and upstream zone size.
1717

1818
## Non-Goals
@@ -31,6 +31,8 @@ API is through a CRD.
3131
The purpose of this CRD is to contain "global" configuration options for the data plane, and not focused on policy
3232
per route or backend.
3333

34+
NGF will reload NGINX when configuration changes are made.
35+
3436
In this doc, the term "user" will refer to the cluster operator (the person who installs and manages NGF). The
3537
cluster operator owns this CRD resource.
3638

@@ -48,30 +50,31 @@ metadata:
4850
name: nginx-proxy-config
4951
namespace: nginx-gateway
5052
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
5962
status:
6063
conditions:
6164
...
6265
```
6366

6467
- The CRD would be Namespace-scoped.
6568
- 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.
6871

6972
[ref]:https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.ParametersReference
7073

7174
## Use Cases
7275

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.
7578

7679
### Tracing
7780

@@ -105,7 +108,7 @@ We need to ensure that any configurable fields that are exposed to a user are:
105108

106109
- Properly validated. This means that the fields should be the correct type (integer, string, etc.), have appropriate
107110
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.
109112
- Have a valid use case. The more fields we expose, the more attack vectors we create. We should only be exposing
110113
fields that are genuinely useful for a user to change dynamically.
111114

@@ -123,6 +126,10 @@ The NGF control plane could implement its own custom API server. However the ove
123126
would include auth, validation, endpoints, and so on, would not be worth it due to the fact that the Kubernetes
124127
API server already does all of these things for us.
125128

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+
126133
## References
127134

128135
- [Kubernetes Custom Resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)

0 commit comments

Comments
 (0)