Skip to content

fix: log warning when pod ports don't match InferencePool targetPorts#2582

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
hexfusion:fix-2562
Mar 16, 2026
Merged

fix: log warning when pod ports don't match InferencePool targetPorts#2582
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
hexfusion:fix-2562

Conversation

@hexfusion

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

Adds a warning log when a pod matches an InferencePool's label selector but none of its container ports intersect with the pool's targetPorts. Previously the pod was silently ignored with no diagnostic output.

Also threads ctx through PodUpdateOrAddIfNotExist to follow the controller-runtime log.FromContext(ctx) pattern consistently.

Which issue(s) this PR fixes:

Fixes #2562

Does this PR introduce a user-facing change?:

Log warning when pod matches InferencePool label selector but has no matching targetPorts

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 14, 2026
@netlify

netlify Bot commented Mar 14, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 817df18
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/69b7fb63c010a50009c8d6c4
😎 Deploy Preview https://deploy-preview-2582--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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 14, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @hexfusion. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

Details

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 14, 2026
Comment thread pkg/epp/datastore/datastore.go

_ = ds.PoolSet(context.Background(), fakeClient, poolutil.InferencePoolToEndpointPool(inferencePool))
_ = ds.PodUpdateOrAddIfNotExist(pod1)
_ = ds.PodUpdateOrAddIfNotExist(context.Background(), pod1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Q: other test used t.Context(), any preferrence to that vs contex.Background()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just following the style from the line above it, and what I saw in general seems to be a mixed usage. i do not have strong feeling as long as its serving same purpose. would you advise adjusting all instances?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see. Ultimately we would want consistency. I don't feel strongly enough to do it in this PR.
Will let others weigh in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no problem adjusting all tests to ensure consistency if we have consensus

}
for _, pod := range test.storePods {
ds.PodUpdateOrAddIfNotExist(pod)
ds.PodUpdateOrAddIfNotExist(context.Background(), pod)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto: t.Context()?

@ahg-g

ahg-g commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 16, 2026
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
@elevran

elevran commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 16, 2026
@nirrozenbaum

Copy link
Copy Markdown
Contributor

/approve

no need to block the PR on context consistency across tests.
overall it's always good to be consistent across the code in case you want to handle in a follow up 🙏 .

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hexfusion, nirrozenbaum

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

The pull request process is described here

Details 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2026
@k8s-ci-robot
k8s-ci-robot merged commit f0ca6ae into kubernetes-sigs:main Mar 16, 2026
11 checks passed
@hexfusion
hexfusion deleted the fix-2562 branch March 16, 2026 14:16
elevran pushed a commit to llm-d/llm-d-router that referenced this pull request Apr 23, 2026
nirrozenbaum pushed a commit to llm-d/llm-d-inference-payload-processor that referenced this pull request Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EPP silently drops pods when container ports don't match InferencePool targetPorts

5 participants