Skip to content

feat: support custom backendRef via extension server#6342

Merged
Xunzhuo merged 1 commit intoenvoyproxy:mainfrom
Xunzhuo:feat-custom-backendRef
Jul 4, 2025
Merged

feat: support custom backendRef via extension server#6342
Xunzhuo merged 1 commit intoenvoyproxy:mainfrom
Xunzhuo:feat-custom-backendRef

Conversation

@Xunzhuo
Copy link
Member

@Xunzhuo Xunzhuo commented Jun 18, 2025

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #4762

Release Notes: Yes

This PR added support for custom backend, it is used widely in vendor specific Backend. Also it is used in Envoy AI Gateway:

apiVersion: inference.networking.x-k8s.io/v1alpha2
kind: InferencePool
metadata:
  name: vllm-llama3-8b-instruct
spec:
  targetPortNumber: 8000
  selector:
    app: vllm-llama3-8b-instruct
  extensionRef:
    name: vllm-llama3-8b-instruct-epp
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: backend
spec:
  parentRefs:
    - name: eg
  hostnames:
    - "www.example.com"
  rules:
    - backendRefs:
        - group: inference.networking.x-k8s.io/v1alpha2
          kind: InferencePool
          name: vllm-llama3-8b-instruct
      matches:
        - path:
            type: PathPrefix
            value: /

@codecov
Copy link

codecov bot commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 74.44934% with 58 lines in your changes missing coverage. Please review.

Project coverage is 70.85%. Comparing base (71ce56f) to head (3ad654d).

Files with missing lines Patch % Lines
internal/provider/kubernetes/controller.go 53.19% 20 Missing and 2 partials ⚠️
internal/provider/kubernetes/routes.go 65.38% 6 Missing and 3 partials ⚠️
internal/xds/translator/extension.go 66.66% 6 Missing and 3 partials ⚠️
internal/provider/kubernetes/filters.go 69.56% 5 Missing and 2 partials ⚠️
internal/extension/registry/extension_manager.go 0.00% 4 Missing ⚠️
internal/extension/registry/xds_hook.go 83.33% 2 Missing and 1 partial ⚠️
internal/gatewayapi/runner/runner.go 0.00% 3 Missing ⚠️
internal/gatewayapi/route.go 98.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6342      +/-   ##
==========================================
+ Coverage   70.76%   70.85%   +0.09%     
==========================================
  Files         220      220              
  Lines       37382    37575     +193     
==========================================
+ Hits        26452    26623     +171     
- Misses       9382     9397      +15     
- Partials     1548     1555       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arkodg arkodg requested review from guydc and liorokman June 18, 2025 13:56
@Xunzhuo Xunzhuo force-pushed the feat-custom-backendRef branch 6 times, most recently from fb91cab to 13e09d4 Compare June 19, 2025 09:23
@Xunzhuo Xunzhuo changed the title feat: support custom backendRef feat: support custom backendRef via extension server Jun 19, 2025
@Xunzhuo Xunzhuo force-pushed the feat-custom-backendRef branch 4 times, most recently from d9a6af6 to 456f8a8 Compare June 19, 2025 10:20
@Xunzhuo
Copy link
Member Author

Xunzhuo commented Jun 19, 2025

/retest

@Xunzhuo Xunzhuo force-pushed the feat-custom-backendRef branch from 456f8a8 to 227fe34 Compare June 25, 2025 08:21
@Xunzhuo Xunzhuo marked this pull request as ready for review June 25, 2025 08:21
@Xunzhuo Xunzhuo requested a review from a team as a code owner June 25, 2025 08:21
@Xunzhuo Xunzhuo force-pushed the feat-custom-backendRef branch from 227fe34 to f34adc8 Compare June 29, 2025 14:48
@Xunzhuo
Copy link
Member Author

Xunzhuo commented Jun 30, 2025

/retest

@zirain zirain force-pushed the feat-custom-backendRef branch from 793ff2f to db89cf5 Compare July 1, 2025 06:18
@Xunzhuo Xunzhuo force-pushed the feat-custom-backendRef branch from db89cf5 to 5fd7ba6 Compare July 1, 2025 14:06
@Xunzhuo
Copy link
Member Author

Xunzhuo commented Jul 1, 2025

/retest

@arkodg arkodg added the area/api API-related issues label Jul 2, 2025
@Xunzhuo
Copy link
Member Author

Xunzhuo commented Jul 3, 2025

/retest

@Xunzhuo Xunzhuo force-pushed the feat-custom-backendRef branch 2 times, most recently from fd4c0c6 to 5955976 Compare July 3, 2025 02:51
arkodg
arkodg previously approved these changes Jul 3, 2025
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks !

@Xunzhuo Xunzhuo force-pushed the feat-custom-backendRef branch 2 times, most recently from 6ddf593 to abea9d2 Compare July 3, 2025 06:40
arkodg
arkodg previously approved these changes Jul 3, 2025
guydc
guydc previously approved these changes Jul 3, 2025
Copy link
Contributor

@guydc guydc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

In general, we need to prioritize investment in E2Es for the extensions server. A lot of users and projects are increasingly relying on this feature which is currently not E2E tested.

@arkodg arkodg dismissed stale reviews from guydc and themself via 3ad654d July 3, 2025 17:36
@Xunzhuo Xunzhuo force-pushed the feat-custom-backendRef branch from 3ad654d to 08afaf5 Compare July 4, 2025 00:02
Signed-off-by: bitliu <bitliu@tencent.com>
@Xunzhuo Xunzhuo force-pushed the feat-custom-backendRef branch from 08afaf5 to c52cfc1 Compare July 4, 2025 00:06
@Xunzhuo Xunzhuo enabled auto-merge (squash) July 4, 2025 00:15
@Xunzhuo
Copy link
Member Author

Xunzhuo commented Jul 4, 2025

/retest

1 similar comment
@Xunzhuo
Copy link
Member Author

Xunzhuo commented Jul 4, 2025

/retest

@Xunzhuo Xunzhuo merged commit 79e9cc8 into envoyproxy:main Jul 4, 2025
44 of 46 checks passed
tjvdmolen pushed a commit to tjvdmolen/gateway that referenced this pull request Jul 11, 2025
Signed-off-by: Tjeerd Jan van der Molen <34071+tjvdmolen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api API-related issues area/extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support custom backendRefs via extensions

4 participants