-
Notifications
You must be signed in to change notification settings - Fork 148
feat: TargetPortNumber int32 to become TargetPorts []Port #1354
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
feat: TargetPortNumber int32 to become TargetPorts []Port #1354
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Hi @capri-xiyue. 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 Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
/assign @ahg-g |
/assign @danehans @nirrozenbaum for InferencePool spec change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @capri-xiyue! This LGTM, curious what others like @danehans and @nirrozenbaum think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @capri-xiyue!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went over the PR.
the main comment I have is that I think this change is too tightly coupled with a specific way to do DP, while there are potentially multiple ways to do that.
if vLLM decides to shift from multiple ports to something else, we're going to get stuck with an array of size one.
I'm not a big fan of the approach that is suggested in this PR.
if we decide to pursue this path of multiple target ports on the CRD, this PR overall looks good. I left few comments.
1d6392f
to
a8c8088
Compare
de34d3d
to
bde16d2
Compare
a1e28ad
to
575a9e2
Compare
dst.Spec.TargetPortNumber = src.Spec.TargetPortNumber | ||
dst.Spec.ExtensionRef = v1Extension | ||
dst.Spec.TargetPorts = []v1.Port{{Number: v1.PortNumber(src.Spec.TargetPortNumber)}} | ||
dst.Spec.ExtensionRef = *v1Extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If ExtensionRef continues to be required (xref), convertExtensionRefToV1()
should return a value instead of a pointer. With that said, convert
should be updated to return a value:
func convert[T any](u *unstructured.Unstructured) (T, error) {
var res T
if err := runtime.DefaultUnstructuredConverter.FromUnstructured(u.Object, &res); err != nil {
var zero T
return zero, fmt.Errorf("error converting unstructured to T: %v", err)
}
return res, nil
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed ExtensionRef to be optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that extRf is req, https://github.com/kubernetes-sigs/gateway-api-inference-extension/pull/1354/files#r2277929730 should be resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the conversion back to return value instead of pointer, but for the function parameter, I still use pointer as I thought it's a golang convention to pass parameter as a pointer for efficiency. Let me know whether it works for you.
Just curious, as ideally should both src
and dst
be a pointer for efficiency no matter whether they are required or not See https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/batch/v1/zz_generated.conversion.go
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: capri-xiyue, danehans 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 |
part of #1336
Does this PR introduce a user-facing change?: