Repository navigation
feat: support UDP health checks for UDPRoute - #10668
zhaohuabing wants to merge 1 commit into
Conversation
✅ Deploy Preview for cerulean-figolla-1f9435 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10668 +/- ##
==========================================
+ Coverage 82.85% 82.86% +0.01%
==========================================
Files 278 278
Lines 44695 44815 +120
==========================================
+ Hits 37032 37136 +104
- Misses 7662 7678 +16
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
I think UDP hc works with HTTPRoute and TCPRoute, but not sure if this is a common case and should we support it in the first iteration. cc @envoyproxy/gateway-maintainers
There was a problem hiding this comment.
+1 for support UDP only in the first iteration.
There was a problem hiding this comment.
For context: on main, HTTP, TCP and gRPC health checks already work on every route type except UDPRoute. This PR adds the UDP checker for all route types, and a UDPRoute takes only the UDP checker.
The UDP checker on HTTP and TCP routes only helps when a backend answers UDP probes but serves its traffic over TCP. If that's rare, I can limit the UDP checker to UDPRoute in this PR.
15ffdd9 to
abb3e20
Compare
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
abb3e20 to
edeb81c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abb3e2009e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| irhc.Passive = buildPassiveHealthCheck(*policy.HealthCheck) | ||
| irhc.Active = buildActiveHealthCheck(*policy.HealthCheck) | ||
| irhc.PanicThreshold = policy.HealthCheck.PanicThreshold | ||
| if validateActiveHealthCheckPayloads(irhc.Active) != nil { |
There was a problem hiding this comment.
Warn when dropping checks from non-BTP backends
When a non-BackendTrafficPolicy BackendSettings consumer, such as an HTTP ExtAuth backend, supplies an expectedResponse larger than 1,024 bytes, this branch clears the active check and can return no health check without an error. Only the BackendTrafficPolicy processing paths report this validation failure, so these resources are still translated without the health check and without a warning; propagate the validation result or report it through those callers too.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed. These resources have no warning status, so an invalid payload now rejects the resource instead of silently dropping the check.
edeb81c to
9e0568b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e0568b0ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| required bool | ||
| } | ||
| var checks []limited | ||
| if hc.UDP != nil { |
There was a problem hiding this comment.
Reject UDP checks without their udp block
For file-provider input, CEL isn't evaluated, so active.type: UDP without active.udp reaches this validator with hc.UDP == nil and queues no payload checks. buildActiveHealthCheck then leaves UDP unset, and udpHealthCheck drops the empty check, allowing a UDPRoute-targeted BackendTrafficPolicy to be accepted without producing probes; validate the required UDP configuration in the translator instead of relying on CRD CEL.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is the same for every checker type, since the file provider doesn't run CEL for any field. For UDP the check is just dropped, so nothing breaks. Validating CEL rules for file-provider input should be handled separately, not per field.
66f27b1 to
686b260
Compare
Adds a UDP active health checker to BackendTrafficPolicy, using Envoy's native UDP health checker. It only applies to UDPRoute backends, and UDPRoute only takes the UDP checker, so existing policies don't start probing UDP backends. Invalid payloads drop the active check with a status warning instead of breaking the cluster. Fixes envoyproxy#10416 Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io> Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
686b260 to
ffc0097
Compare
Adds a
UDPactive health checker to BackendTrafficPolicy for UDPRoute backends, using Envoy's native UDP health checker. A probe sends one datagram and passes only when the reply matches the expected payload exactly.The UDP checker only applies to UDPRoute, and UDPRoute only takes the UDP checker, so existing policies don't start probing UDP backends. Any other pairing gets a status warning.
Fixes #10416