Skip to content

Inference: Updates InferencePool Status Management #11621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

danehans
Copy link
Contributor

@danehans danehans commented Jul 9, 2025

Description

When an InferencePool was first created, the k8s API server auto-populates one synthetic parent entry. Every time the endpointpicker plugin tried to append the real Gateway parent (or remove it again), the list kept toggling between [default,…] and […].

This PR added stripDefaultParent() and called it in all paths that read/write inferencepool.Status.Parents:

  • addGatewayParentRef
  • findGatewayParentRef
  • removeGatewayParentRef

Fixes #11554

InferencePool status was not being updated when referent/referenced (HTTPRoute and Service) object events were triggered:

  • Refactored buildRegisterCallback() to accept the triggering InferencePool status calculation based on HTTPRoute and Service events.
  • Expanded InferencePool validation.
  • Improved status Logic- referencedGateway() no longer aborts on type assertion failures and continues scanning remaining routes. Removed the GatewayClass check since the GatewayIndex only contains Gateways whose GatewayClass.controllerName matches kgateway. Any Gateway coming out of this index is guaranteed to be managed by kgateway.
  • Tests- Added new unit tests covering status edge cases (cross-ns parentRef, wrong kind parentRef, etc.). Updated existing e2e tests to check for expected InferencePool parent status conditions.

Partially Fixes #11379

Change Type

/kind bug_fix
/kind cleanup

Changelog

Endpointpicker plugin: Fixes InferencePool status reconciliation by stripping the synthetic "default" parent entry and patching status when an InferencePool or referent/referenced object event is received.

Additional Notes

  • No CRD or API changes.

@github-actions github-actions bot added do-not-merge/kind-invalid Indicates a PR lacks a `kind/foo` label and requires one. release-note kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/fix Categorizes issue or PR as related to a bug. and removed do-not-merge/kind-invalid Indicates a PR lacks a `kind/foo` label and requires one. labels Jul 9, 2025
Signed-off-by: Daneyon Hansen <[email protected]>
@danehans danehans marked this pull request as draft July 9, 2025 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/fix Categorizes issue or PR as related to a bug. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inference Plugin: InferencePool Status Conditions Not Being Updated Inference Extension: Extend Support for InferencePool Status
1 participant