Skip to content

Conversation

@shmuelk
Copy link
Contributor

@shmuelk shmuelk commented Nov 16, 2025

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Gateway Inference Extension (GIE) PR #1663 added support for vLLM's Data Parallel feature. This feature enables running more than one exposed vLLM HTTP endpoint in a pod/container.

Previously the GIE assumed that there was only one vLLM endpoint per pod. Thus it tracked per pod information and called it PodInfo.

To simplify things PR #1663 simply treated each of the vLLM endpoints, described in a GIE InferencePool, as another pod with an appropriate PodInfo struct.

It was pointed out during the review of PR #1663 by @kfswain that we need to rename some of the structs due to the changes. Details can be found here

This PR is the first of several that will refactor/rename various structs/APIs to better reflect their usage.

In particular this PR:

  • Renames PodInfo (in pkg/epp/datalayer) to EndpointMetadata
  • Renames EndpointPodState (in pkg/epp/datalayer) to EndpointMetaState
    • Its functions GetPod() and UpdatePod() have been renamed GetMetadata() and UpdateMetadata() repectively
  • Many places in the code that referenced backendmetrics.PodMetrics now referrece datalayer.Endpoint directly

Future PRs will do more of this refactoring/renaming and will improve variable names in the code as well.

None

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Nov 16, 2025
@netlify
Copy link

netlify bot commented Nov 16, 2025

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

Name Link
🔨 Latest commit ef6aed2
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/6931dc6e8830c30008d46880
😎 Deploy Preview https://deploy-preview-1866--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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 16, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 18, 2025
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 21, 2025
}

func (pm *podMetrics) GetPod() *backend.Pod {
func (pm *podMetrics) GetMetadata() *backend.Pod {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This one still returns a backend.Pod :(

This seems to just be an indirection/alias of datalayer.PodInfo.

type Pod = datalayer.PodInfo

Do we know if this is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have updated the code you mentioned.

The indirection/alias of backend.Pod to datalayer.EndpointMetadata (was PodInfo) is still used in many places in the code.

This PR removes some of those "indirect references". I though to take care of this in multiple PRs to keep the size down.

I can if you want, make all of the changes in one Pr.

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 23, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 1, 2025
pods := ds.PodList(func(_ backendmetrics.PodMetrics) bool { return true })
names := make([]types.NamespacedName, 0, len(pods))

for _, p := range pods {
Copy link
Contributor

Choose a reason for hiding this comment

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

I presume a future PR will remove all references to Pod?
For example for _, p := range pods of the function name/type (makePodListFunc)


func (fpm *FakePodMetrics) String() string {
return fmt.Sprintf("Pod: %v; Metrics: %v", fpm.GetPod(), fpm.GetMetrics())
return fmt.Sprintf("Pod: %v; Metrics: %v", fpm.GetMetadata(), fpm.GetMetrics())
Copy link
Contributor

Choose a reason for hiding this comment

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

if you're changing this line anyway consider changing the text as well.

Suggested change
return fmt.Sprintf("Pod: %v; Metrics: %v", fpm.GetMetadata(), fpm.GetMetrics())
return fmt.Sprintf("Metadata: %v; Metrics: %v", fpm.GetMetadata(), fpm.GetMetrics())

Copy link
Contributor

Choose a reason for hiding this comment

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

The same applies in other lines in all files where you've already replaced the GetPod() and contain pod


func (pm *podMetrics) stopRefreshLoop() {
pm.logger.V(logutil.DEFAULT).Info("Stopping refresher", "pod", pm.GetPod())
pm.logger.V(logutil.DEFAULT).Info("Stopping refresher", "pod", pm.GetMetadata())
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pm.logger.V(logutil.DEFAULT).Info("Stopping refresher", "pod", pm.GetMetadata())
pm.logger.V(logutil.DEFAULT).Info("Stopping refresher", "endpoint", pm.GetMetadata())

// pooled memory or other management chores in the implementation.
type EndpointFactory interface {
NewEndpoint(parent context.Context, inpod *PodInfo, poolinfo PoolInfo) Endpoint
NewEndpoint(parent context.Context, inEnpointMetadata *EndpointMetadata, poolinfo PoolInfo) Endpoint
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: prefer shorter variables if possible (e.g., meta or inmd in this case)?

}

logger := log.FromContext(ctx).WithValues("pod", ep.GetPod().NamespacedName)
logger := log.FromContext(ctx).WithValues("pod", ep.GetMetadata().NamespacedName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
logger := log.FromContext(ctx).WithValues("pod", ep.GetMetadata().NamespacedName)
logger := log.FromContext(ctx).WithValues("metadata", ep.GetMetadata().NamespacedName)

@elevran
Copy link
Contributor

elevran commented Dec 2, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 2, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 2, 2025
@elevran
Copy link
Contributor

elevran commented Dec 2, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 2, 2025
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 4, 2025
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 4, 2025
@kfswain
Copy link
Collaborator

kfswain commented Dec 4, 2025

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kfswain, shmuelk

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

The pull request process is described 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2025
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants