Skip to content

feat: avoid duplicate of InferencPool golang types. #1150

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

Closed

Conversation

capri-xiyue
Copy link
Contributor

@capri-xiyue capri-xiyue commented Jul 12, 2025

avoid duplicate of InferencPool golang types following https://github.com/kubernetes-sigs/gateway-api/blob/093f6538409c071e906856bd1ce4072204fb3f08/apis/v1beta1/gateway_types.go#L48-L55.

It comes with the limitation that the crd-gen will just generate v1 InferencePool CRD and won't generate alpha InferencePool CRD. It is probably because we are using https://github.com/kubernetes-sigs/gateway-api/blob/093f6538409c071e906856bd1ce4072204fb3f08/apis/v1beta1/gateway_types.go#L48-L55.
for InferencePool here with v1 and alpha InferencePool actually belongs to different groups, one with inferencepools.inference.networking.k8s.io and the other with inferencepools.inference.networking.x-k8s.io

The PR will cause

  1. removal of inferencepools.inference.networking.x-k8s.io InferencePool CRD
  2. removal of deepcopy generated code of any fields related to alpha type InferencePool like EndpointPickerConfig and InferencePoolSpec , only InferencePool and InferencePoolList will be kept.
  3. Any inferencepools.inference.networking.x-k8s.io InferencePool CRD no longer exists, any test including inferencepools.inference.networking.x-k8s.io InferencePool CRD will need to get removed.

Here is the graph

InferencePool API Version Group API Types Generated Client CRD
v1alpha2 inference.networking.x-k8s.io Yes Yes No
v1 inference.networking.k8s.io Yes(use type InferencePool v1.InferencePool syntax) Yes Yes

Rationale
We'd encourage users and controllers to exclusively focus on the v1 API going forward, thus we omit the v1alpha2 CRD from the release. However, this PR leaves controllers with the option to support both v1a2 and v1 concurrently. An approach is to represent alpha InferencePool in v1 InferencePool but override the group to inference.networking.x-k8s.io

Copy link

netlify bot commented Jul 12, 2025

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

Name Link
🔨 Latest commit d311020
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/687ee1538bf9f20008ab1b85
😎 Deploy Preview https://deploy-preview-1150--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-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 12, 2025
@k8s-ci-robot
Copy link
Contributor

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 /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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 12, 2025
@capri-xiyue capri-xiyue changed the title feat: avoid duplicate of InferencPool golang types. [WIP] feat: avoid duplicate of InferencPool golang types. Jul 12, 2025
@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 Jul 12, 2025
@capri-xiyue capri-xiyue changed the base branch from main to release-1.0 July 12, 2025 01:05
@capri-xiyue
Copy link
Contributor Author

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 12, 2025
@capri-xiyue
Copy link
Contributor Author

/assign @kfswain

@capri-xiyue
Copy link
Contributor Author

/assign @robscott

@kfswain
Copy link
Collaborator

kfswain commented Jul 14, 2025

/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. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 14, 2025
@capri-xiyue capri-xiyue changed the base branch from release-1.0 to main July 15, 2025 19:48
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jul 15, 2025
@capri-xiyue capri-xiyue changed the title [WIP] feat: avoid duplicate of InferencPool golang types. feat: avoid duplicate of InferencPool golang types. Jul 15, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 15, 2025
@capri-xiyue
Copy link
Contributor Author

/hold until #1118 get merged

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 15, 2025
@capri-xiyue
Copy link
Contributor Author

I've deleted the generated client files and run make generate again, no more generated client will get deleted. So the PR capri-xiyue#2 already shows all the contents that need to get deleted @robscott

@capri-xiyue capri-xiyue changed the title feat: avoid duplicate of InferencPool golang types. [WIP] feat: avoid duplicate of InferencPool golang types. Jul 16, 2025
@capri-xiyue capri-xiyue force-pushed the capri-xiyue/v1-crd-only branch from d2e4ba6 to d311020 Compare July 22, 2025 00:54
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 22, 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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that 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.

4 participants