Skip to content

feat: add validation of backend endpointslice - #6315

Merged
arkodg merged 16 commits into
envoyproxy:mainfrom
kkk777-7:add-validate-endpointslice
Oct 16, 2025
Merged

arkodg merged 16 commits into
envoyproxy:mainfrom
kkk777-7:add-validate-endpointslice

Conversation

@kkk777-7

@kkk777-7 kkk777-7 commented Jun 15, 2025 •

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Add validation of backend endpointslice (Service/ServiceImport).
If no ready endpoints, return 503 response and set BackendsAvailable condition.

According to the Gateway API specification, a 503 status code should be returned when no valid endpoint exists.
kubernetes-sigs/gateway-api#3121

According to this comment, it seem that the ResolvedRefs condition in xRoute might be used only for references to backend resources such as Services.
And confirmed that the Gateway API conformance test fails when ResolvedRefs is set to false in the absence of an endpoint.

        Failed to process route rule 2 backendRef 0: no ready endpoints for the related Service gateway-conformance-infra/headless-manual-endpointslices.}]]
    helpers.go:744: 2025-09-09T21:04:40.06465+09:00: ResolvedRefs condition set to Status False with Reason EndpointsNotFound, expected Status True
    helpers.go:744: 2025-09-09T21:04:40.064778+09:00: ResolvedRefs was not in conditions list [[{Accepted True 1 2025-09-09 21:04:11 +0900 JST Accepted Route is accepted} {ResolvedRefs False 1 2025-09-09 21:04:11 +0900 JST EndpointsNotFound Failed to process route rule 0 backendRef 0: no ready endpoints for the related Service gateway-conformance-infra/manual-endpointslices.

so, we define custom condition BackendsAvailable and set in status.

Which issue(s) this PR fixes:

Fixes #6269

Release Notes: Yes

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Annotate HTTPRoute when detecting an issue with EndpointSlice + Service configuration

4 participants