Skip to content

Commit 694e813

Browse files
committed
Code review round 1
1 parent 8f341fb commit 694e813

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docs/proposals/gateway-settings.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Enhancement Proposal-1630: Gateway Settings
1+
# Enhancement Proposal-1775: Gateway Settings
22

33
- Issue: https://github.com/nginxinc/nginx-gateway-fabric/issues/1775
44
- Status: Implementable
@@ -28,14 +28,16 @@ To begin, the Gateway Settings config will include the following NGINX directive
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)
31-
- [`otel_span_attr`](https://nginx.org/en/docs/ngx_otel_module.html#otel_span_attr): set global span attributes that will be merged with the span attributes set in the [Observability extension](nginx-extensions.md#gateway-settings).
31+
- [`otel_span_attr`](https://nginx.org/en/docs/ngx_otel_module.html#otel_span_attr): set global span attributes that will be merged with the span attributes set in the [Observability extension](nginx-extensions.md#observability).
3232

3333
In the future, this config will be extended to support other directives, such as those defined in the [NGINX Extensions Proposal](nginx-extensions.md#gateway-settings).
3434

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

3737
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.
3838

39+
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.
40+
3941
For example, a `GatewaySettings` named `gw-settings` would be referenced as follows:
4042

4143
```yaml
@@ -75,7 +77,8 @@ type GatewaySettingsSpec struct {
7577
// +optional
7678
OtelExporter *OtelExporter `json:"otelExporter,omitempty"`
7779

78-
// OtelServiceName is the "service.name" attribute of the Otel resource.
80+
// OtelServiceName is the "service.name" attribute of the Otel resourc.
81+
// Default is 'nginx-gateway-fabric:<gateway-name>'.
7982
// +optional
8083
OtelServiceName *string `json:"otelServiceName,omitempty"`
8184

@@ -120,8 +123,6 @@ type Duration string
120123

121124
#### Conditions
122125

123-
According to the [Policy and Metaresources GEP](https://gateway-api.sigs.k8s.io/geps/gep-713/), the `GatewaySettings` CRD must include a `status` stanza with a slice of Conditions.
124-
125126
The `Accepted` Condition must be populated on the `GatewaySettings` CRD using the reasons defined in the [PolicyCondition API](https://github.com/kubernetes-sigs/gateway-api/blob/main/apis/v1alpha2/policy_types.go). If these reasons are not sufficient, we can add implementation-specific reasons.
126127

127128
#### GatewayClass Status
@@ -133,7 +134,7 @@ Below is an example of what this Condition may look like:
133134

134135
```yaml
135136
Conditions:
136-
Type: gateway.nginx.org/ResolvedRefs
137+
Type: ResolvedRefs
137138
Message: All references are resolved
138139
Observed Generation: 1
139140
Reason: ResolvedRefs
@@ -153,7 +154,7 @@ Some additional rules:
153154
## Testing
154155

155156
- Unit tests
156-
- Functional tests that verify the attachment of the CRD to the GatewayClass, and that NGINX behaves properly based on the configuration.
157+
- Functional tests that verify the attachment of the CRD to the GatewayClass, and that NGINX behaves properly based on the configuration. This includes verifying tracing works as expected.
157158

158159
## Security Considerations
159160

0 commit comments

Comments
 (0)