Skip to content

Conversation

@RyanRosario
Copy link

What type of PR is this?

What this PR does / why we need it:

This tests a new setup involving multiple ports per pod and routing traffic to to each virtual pod.

Which issue(s) this PR fixes:

Fixes #1663

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 14, 2025
@netlify
Copy link

netlify bot commented Nov 14, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit d2e3fa9
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/6916c29bcb75af0008ccf4f3
😎 Deploy Preview https://deploy-preview-1864--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 14, 2025

CLA Not Signed

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: RyanRosario
Once this PR has been reviewed and has the lgtm label, please assign kfswain for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from elevran November 14, 2025 05:16
@k8s-ci-robot
Copy link
Contributor

Welcome @RyanRosario!

It looks like this is your first PR to kubernetes-sigs/gateway-api-inference-extension 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api-inference-extension has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 14, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @RyanRosario. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 14, 2025
@RyanRosario
Copy link
Author

RyanRosario commented Nov 14, 2025

General workflow/thoughts based on a lot of reading.

Note that this need a lot of refactoring on my end, but I am submitting to show progress and also get assistance.

BeforeEach:

  1. Delete old objects from previous runs: objective, deployment, pool and service
  2. Delete the global InferenceObjective which conflicts with the one I have written.
  3. Create a deployment for multiport as well as service.
  4. Create a new pool containing the same name as the previous pool (so that the controller sees it) but with characteristics specific to the multiport case.
  5. Create an InferenceObjective pointing at the new InferencePool
  6. Wait for the InferenceObjective to reach the ready/accepted state.
  7. (AfterEach deletes all resources)

The rest of the test attempts to send messages to each port and makes sure that it receives the proper response.

@RyanRosario RyanRosario changed the title [WIP] E2E test setup for multiport case [WIP][Reference] E2E test setup for multiport case Nov 14, 2025
@RyanRosario
Copy link
Author

I think this needs a completely different approach. InferencePool already has support for multi port. Users may or may not use it but both use cases are supported.

I think the goal should be to modify verifyTrafficRouting() and verifyMetrics() rather than create an entirely new test.

Thus, my approach is:

  1. Modify CRD YAML to include multiple ports, even just two.
  2. The default test becomes Multiport InferencePool where the standard InferencePool with one part is simply a subset of it.

@RyanRosario
Copy link
Author

RyanRosario commented Nov 15, 2025

More thoughts here.

It seems Envoy handles the routing. Fire, say, 10 requests and look for a response from the backend. However, the backend simply responds with JSON and HTTP header. We can add a custom header to the HTTP response containing the backend port that handled the request: x-backend-port. Keep track of which ports we have heard from. By induction, we really only need 2 ports for this test.

This means the container that responds to the HTTP request must respond with this header so that image must be rebuilt. This should not break the standard/classic single port pool.

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

Labels

cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants