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: docs/proposals/observability.md
+56-52Lines changed: 56 additions & 52 deletions
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,9 @@ This Enhancement Proposal introduces the `ObservabilityPolicy` API, which allows
20
20
21
21
### Observability Policy
22
22
23
-
The Observability Policy contains settings to configure NGINX to expose information through tracing, metrics, and/or logging. This is a Direct Policy that is attached to an HTTPRoute or HTTPRoute Rule by an Application Developer. It works in conjunction with a [Gateway Settings](gateway-settings.md) configuration that contains higher level settings to enable Observability at this lower level. The [Gateway Settings](gateway-settings.md) configuration is managed by a Cluster Operator.
23
+
The Observability Policy contains settings to configure NGINX to expose information through tracing, metrics, and/or logging. This is a Direct Policy that is attached to an HTTPRoute by an Application Developer. It works in conjunction with a [Gateway Settings](gateway-settings.md) configuration that contains higher level settings to enable Observability at this lower level. The [Gateway Settings](gateway-settings.md) configuration is managed by a Cluster Operator.
24
24
25
-
Since this policy is attached to an HTTPRoute or HTTPRoute rule, the Observability settings should just apply to the relevant `location` contexts of the NGINX config for that route or rule.
25
+
Since this policy is attached to an HTTPRoute, the Observability settings should just apply to the relevant `location` contexts of the NGINX config for that route.
26
26
27
27
To begin, the Observability Policy will include the following NGINX directives (focusing on OpenTelemetry tracing):
28
28
@@ -39,7 +39,7 @@ In the future, this config will be extended to support other functionality, such
39
39
40
40
## API, Customer Driven Interfaces, and User Experience
41
41
42
-
The `ObservabilityPolicy` API is a CRD that is a part of the `gateway.nginx.org` Group. It is a namespaced resource that will reference an HTTPRoute or HTTPRoute Rule as its target.
42
+
The `ObservabilityPolicy` API is a CRD that is a part of the `gateway.nginx.org` Group. It is a namespaced resource that will reference an HTTPRoute as its target.
43
43
44
44
### Go
45
45
@@ -49,90 +49,90 @@ Below is the Golang API for the `ObservabilityPolicy` API:
@@ -210,6 +210,8 @@ According to the [Policy and Metaresources GEP](https://gateway-api.sigs.k8s.io/
210
210
211
211
The `Accepted` Condition must be populated on the `ObservabilityPolicy` 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.
212
212
213
+
One reason for being `not Accepted` would be the fact that the `GatewaySettings` Policy is not configured, which is a requirement in order for the `ObservabilityPolicy` to work.
214
+
213
215
The Condition stanza may need to be namespaced using the `controllerName` if more than one controller could reconcile the Policy.
214
216
215
217
In the updated version of the [Policy and Metaresources GEP](https://github.com/kubernetes-sigs/gateway-api/pull/2813/files), which is still under review, the `PolicyAncestorStatus` applies to Direct Policies.
@@ -260,9 +262,11 @@ Some additional rules:
260
262
261
263
## Attachment
262
264
263
-
An `ObservabilityPolicy` can be attached to an HTTPRoute or an HTTPRoute rule (using a [sectionName](https://gateway-api.sigs.k8s.io/geps/gep-713/#apply-policies-to-sections-of-a-resource)).
265
+
An `ObservabilityPolicy` can be attached to an HTTPRoute.
266
+
267
+
The policy will only take effect if a [GatewaySettings](gateway-settings.md) configuration has been linked to the GatewayClass. Otherwise, the `ObservabilityPolicy` should not be `Accepted`.
264
268
265
-
The policy will only take effect if a [GatewaySettings](gateway-settings.md) configuration has been linked to the GatewayClass.
269
+
Future: Attached to an HTTPRoute rule, using a [sectionName](https://gateway-api.sigs.k8s.io/geps/gep-713/#apply-policies-to-sections-of-a-resource).
266
270
267
271
### Creating the Effective Policy in NGINX Config
268
272
@@ -288,7 +292,7 @@ For this attachment scenario, specifying the directives in the _final_ location
288
292
## Testing
289
293
290
294
- Unit tests
291
-
- Functional tests that verify the attachment of the CRD to a Route or Route rule, and that NGINX behaves properly based on the configuration. This includes verifying tracing works as expected.
295
+
- Functional tests that verify the attachment of the CRD to a Route, and that NGINX behaves properly based on the configuration. This includes verifying tracing works as expected.
0 commit comments