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
Update SnippetFilter validation rules in enhancement proposal (nginx#2471)
Problem: The advanced nginx extensions proposal doesn't provide guidance on handling routes that reference invalid or nonexistent SnippetFilters.
Solution: Add guidance on handling these cases to the enhancement proposal. The guidance is based off the Gateway API spec documentation.
Copy file name to clipboardExpand all lines: docs/proposals/advanced-nginx-extensions.md
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -445,6 +445,23 @@ one `http` snippet with multiple `http` snippets scattered around in the spec.
445
445
446
446
NGF will not validate the values of snippets. See the next section.
447
447
448
+
When a SnippetsFilter is specified in a routing rule and one of the following is true:
449
+
450
+
- the SnippetsFilter does not exist
451
+
- the SnippetsFilter referenced is invalid
452
+
- the same SnippetsFilter is referenced multiple times
453
+
454
+
the filter MUST NOT be skipped. Instead, requests that would have been processed by that filter MUST receive a 500 HTTP error code response.
455
+
In addition, the `ResolvedRefs` condition should be set to `False` with one of the following reasons:
456
+
457
+
- `FilterNotFound`
458
+
- `InvalidFilter`
459
+
460
+
These reasons are not defined in the Gateway API library, so they will need to be added and documented.
461
+
In addition, the `Accepted` route condition should be set to `True`.
462
+
463
+
Refer to [HTTPRouteFilter API](https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.HTTPRouteFilter) for more implementation details.
464
+
448
465
#### NGINX Values
449
466
450
467
An invalid snippet can break NGINX config. When this happens, NGINX will continue to use the last valid configuration.
0 commit comments