Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dgn
Copy link
Contributor

@dgn dgn commented Nov 7, 2025

Please provide a description of this PR:
This adds support for multiple targetPorts on an InferencePool by merging all endpoints across all targetPorts into a single Envoy cluster, so that the EPP can load-balance across them. The ability to configure multiple targetPorts in an InferencePool was introduced in GIE v1.1.0.

I also used Claude Code to generate an EPP mock that I'm using in the integration test. It accepts an X-Endpoint header that allows the test to predetermine which endpoint should be selected.

It's become a quite large PR so I split it into multiple smaller commits to make reviews easier.

Fixes #57638

@istio-testing istio-testing added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 7, 2025
@dgn dgn force-pushed the fix-57638 branch 2 times, most recently from e795eb0 to d092e37 Compare November 7, 2025 13:07
dgn and others added 2 commits November 7, 2025 14:10
Implements the EPP protocol. It accepts an X-Endpoint header that allows
the integration test to determine which endpoint will be picked by the
EPP.

Co-Authored-By: Claude <[email protected]>
I planned on updating to v1.1.0 but ran into dependency issues. Now
pointing to the commit that loosened restrictions on number of
targetPorts.
}

// Fallback if no targetPorts specified
if len(ports) == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

since inferPool's TargetPorts cannot be empty, is this check necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's correct- I'll remove the check

var out []*IstioEndpoint

// For InferencePool services, return ALL endpoints regardless of port
// because they may have different target ports but belong to the same cluster
Copy link
Member

Choose a reason for hiding this comment

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

maybe i missed some ctx, since the epp is responsible for lb, why do istio still need to generate all endpoints with all target ports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the EPP will just return an endpoint to envoy, but for envoy to be able to route to that endpoint, it must exist in the envoy cluster. that's why we need to combine them here, so that they end up in the same envoy cluster

@LiorLieberman
Copy link
Contributor

/cc

dgn added 3 commits November 13, 2025 17:06
This adds support for multiple targetPorts in an InferencePool by adding
all targetPorts to the shadow service, and then making sure that only a
single cluster is created for the dummy port (54321), allowing the EPP
to loadbalance across all endpoints.
@istio-testing
Copy link
Collaborator

istio-testing commented Nov 13, 2025

@dgn: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
integ-ambient-mc_istio 5b814be link false /test integ-ambient-mc

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

area/networking size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Istio configures Envoy incorrectly if there are multiple TargetPorts on an InferencePool

5 participants