Skip to content

Commit 2432d57

Browse files
committed
Update CRD name to NginxProxy
1 parent ed186a9 commit 2432d57

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

docs/proposals/gateway-settings.md

+26-26
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55

66
## Summary
77

8-
This Enhancement Proposal introduces the `GatewaySettings` API, which allows Cluster Operators to define configuration at the GatewayClass level for all Gateways under that Class. This configuration is attached via the GatewayClass `parametersRef` field.
8+
This Enhancement Proposal introduces the `NginxProxy` API, which allows Cluster Operators to define configuration at the GatewayClass level for all Gateways (proxies) under that Class. This configuration is attached via the GatewayClass `parametersRef` field.
99

1010
## Goals
1111

1212
- Define the Gateway settings.
13-
- Define an API for the Gateway settings.
13+
- Define an API for the NginxProxy CRD.
1414

1515
## Non-Goals
1616

17-
- Provide implementation details for implementing the Gateway settings.
17+
- Provide implementation details for implementing the NginxProxy configuration.
1818

1919
## Introduction
2020

2121
### Gateway Settings
2222

23-
Gateway Settings are NGINX directives or configuration attached at the GatewayClass level that should be solely controlled by the Cluster Operator and should not be changed by the Application Developers. All Gateways attached to this GatewayClass will inherit these settings.
23+
Gateway settings are NGINX directives or configuration attached at the GatewayClass level that should be solely controlled by the Cluster Operator and should not be changed by the Application Developers. All Gateways attached to this GatewayClass will inherit these settings.
2424

25-
These settings apply to the `main`, `http`, and/or `stream` contexts of the NGINX config.
25+
These settings apply to the `main`, `http`, and/or `stream` contexts of the NGINX config. The `NginxProxy` CRD will contain these settings.
2626

27-
To begin, the Gateway Settings config will include the following NGINX directives (focusing on OpenTelemetry tracing):
27+
To begin, the `NginxProxy` CRD will include the following NGINX directives (focusing on OpenTelemetry tracing):
2828

2929
- [`otel_exporter`](https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter)
3030
- [`otel_service_name`](https://nginx.org/en/docs/ngx_otel_module.html#otel_service_name)
@@ -34,11 +34,11 @@ In the future, this config will be extended to support other directives, such as
3434

3535
## API, Customer Driven Interfaces, and User Experience
3636

37-
The `GatewaySettings` API is a CRD that is a part of the `gateway.nginx.org` Group. It will be referenced in the `parametersRef` field of a GatewayClass. It will live at the cluster scope.
37+
The `NginxProxy` API is a CRD that is a part of the `gateway.nginx.org` Group. It will be referenced in the `parametersRef` field of a GatewayClass. It will live at the cluster scope.
3838

3939
This is a dynamic configuration that can be changed by a user at any time, and NGF will propagate those changes to NGINX. This is something we need to clearly document in our public documentation about this feature, so that users know that all Gateways under the Class can be updated by these settings.
4040

41-
For example, a `GatewaySettings` named `gw-settings` would be referenced as follows:
41+
For example, an `NginxProxy` named `proxy-settings` would be referenced as follows:
4242

4343
```yaml
4444
kind: GatewayClass
@@ -48,11 +48,11 @@ spec:
4848
controllerName: gateway.nginx.org/nginx-gateway-controller
4949
parametersRef:
5050
group: gateway.nginx.org/v1alpha1
51-
kind: GatewaySettings
52-
name: gw-settings
51+
kind: NginxProxy
52+
name: proxy-settings
5353
```
5454
55-
Below is the Golang API for the `GatewaySettings` API:
55+
Below is the Golang API for the `NginxProxy` API:
5656

5757
### Go
5858

@@ -61,15 +61,15 @@ package v1alpha1
6161
6262
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
6363
64-
type GatewaySettings struct {
64+
type NginxProxy struct {
6565
metav1.TypeMeta `json:",inline"`
6666
metav1.ObjectMeta `json:"metadata,omitempty"`
6767

68-
// Spec defines the desired state of the GatewaySettings.
69-
Spec GatewaySettingsSpec `json:"spec"`
68+
// Spec defines the desired state of the NginxProxy.
69+
Spec NginxProxySpec `json:"spec"`
7070
}
7171

72-
type GatewaySettingsSpec struct {
72+
type NginxProxySpec struct {
7373
// Telemetry specifies the OpenTelemetry configuration.
7474
//
7575
// +optional
@@ -128,9 +128,9 @@ type Duration string
128128

129129
#### GatewayClass
130130

131-
There are two Conditions on the GatewayClass status to consider when using the `parametersRef`. The first is a `ResolvedRefs` Condition. If the `GatewaySettings` reference cannot be found, then this Condition is set to `False`.
131+
There are two Conditions on the GatewayClass status to consider when using the `parametersRef`. The first is a `ResolvedRefs` Condition. If the `NginxProxy` reference cannot be found, then this Condition is set to `False`.
132132

133-
NGINX Gateway Fabric must set this Condition on the GatewayClass affected by a `GatewaySettings`.
133+
NGINX Gateway Fabric must set this Condition on the GatewayClass affected by an `NginxProxy`.
134134
Below is an example of what this Condition may look like:
135135

136136
```yaml
@@ -144,13 +144,13 @@ Conditions:
144144
145145
Some additional rules:
146146
147-
- This Condition should be added when the affected object starts being affected by a `GatewaySettings`.
148-
- When the `GatewaySettings` affecting that object is removed, the Condition should be removed.
149-
- The Observed Generation is the generation of the GatewayClass, not the generation of the `GatewaySettings`.
147+
- This Condition should be added when the affected object starts being affected by an `NginxProxy`.
148+
- When the `NginxProxy` affecting that object is removed, the Condition should be removed.
149+
- The Observed Generation is the generation of the GatewayClass, not the generation of the `NginxProxy`.
150150

151-
The other condition is the existing `Accepted` condition on the GatewayClass. There is an existing reason for this Condition, `InvalidParameters`, that sets `Accepted` to `False` when the `parametersRef` fields are invalid. However, this could lead to downstream problems. For example, if a GatewayClass is `Accepted`, and then `GatewaySettings` are updated to something invalid, then marking the GatewayClass as `not Accepted` would result in the entire downstream configuration tree being nullified. This is a large disruption.
151+
The other condition is the existing `Accepted` condition on the GatewayClass. There is an existing reason for this Condition, `InvalidParameters`, that sets `Accepted` to `False` when the `parametersRef` fields are invalid. However, this could lead to downstream problems. For example, if a GatewayClass is `Accepted`, and then `NginxProxy` are updated to something invalid, then marking the GatewayClass as `not Accepted` would result in the entire downstream configuration tree being nullified. This is a large disruption.
152152

153-
The proposition is to instead keep the GatewayClass as `Accepted` even if the `GatewaySettings` are invalid, but still set the reason to `InvalidParameters` and include a detailed message about the issue. In this case, default values will be reverted to for the settings, and downstream configuration will remain intact. There may be impact by reverting to defaults, but this impact is likely less than the impact of completely nullifying all Gateways/Routes/etc. that live under the GatewayClass if we instead marked it as `not Accepted`
153+
The proposition is to instead keep the GatewayClass as `Accepted` even if the `NginxProxy` are invalid, but still set the reason to `InvalidParameters` and include a detailed message about the issue. In this case, default values will be reverted to for the settings, and downstream configuration will remain intact. There may be impact by reverting to defaults, but this impact is likely less than the impact of completely nullifying all Gateways/Routes/etc. that live under the GatewayClass if we instead marked it as `not Accepted`.
154154

155155
If this scenario occurs, we must be clear about what happened. Log an error, an event, and write the status. We should also set the generation to the last known good state of the resource.
156156

@@ -165,16 +165,16 @@ If this scenario occurs, we must be clear about what happened. Log an error, an
165165

166166
## Security Considerations
167167

168-
Validating all fields in the `GatewaySettings` is critical to ensuring that the NGINX config generated by NGINX Gateway Fabric is correct and secure.
168+
Validating all fields in the `NginxProxy` is critical to ensuring that the NGINX config generated by NGINX Gateway Fabric is correct and secure.
169169

170-
All fields in the `GatewaySettings` will be validated with Open API Schema. If the Open API Schema validation rules are not sufficient, we will use [CEL](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules).
170+
All fields in the `NginxProxy` will be validated with Open API Schema. If the Open API Schema validation rules are not sufficient, we will use [CEL](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules).
171171

172-
RBAC via the Kubernetes API server will ensure that only authorized users can update the CRD containing Gateway Settings.
172+
RBAC via the Kubernetes API server will ensure that only authorized users can update the CRD.
173173

174174
## Alternatives
175175

176176
- ParametersRef with ConfigMap: A ConfigMap is another resource type where a user can provide configuration options. However, unlike CRDs, ConfigMaps do not have built-in schema validation, versioning, or conversion webhooks.
177-
- Direct Policy: A Direct Policy may also work for Gateway Settings. It can be attached to a Gateway and scoped to Cluster Operators through RBAC. It would allow Cluster Operators to apply settings for specific Gateways, instead of all Gateways.
177+
- Direct Policy: A Direct Policy may also work for Gateway settings. It can be attached to a Gateway and scoped to Cluster Operators through RBAC. It would allow Cluster Operators to apply settings for specific Gateways, instead of all Gateways.
178178

179179
## References
180180

0 commit comments

Comments
 (0)