Skip to content

Conversation

KillianGolds
Copy link

@KillianGolds KillianGolds commented Oct 3, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:
Fixes CRD generation error by changing MinItems/MaxItems validation markers to MinProperties/MaxProperties for the MatchLabels field in LabelSelector. Since MatchLabels is a map type (not an array), controller-gen was throwing errors about applying array constraints to a map. This change uses the correct validation markers for map types.

Tested the changes locally via:
CRD Generation - Generated CRDs with the corrected validation markers (minProperties: 1 and maxProperties: 64 instead of minItems/maxItems)
CRD Validation - All CRDs passed validation with kubectl-validate
Unit Tests - All unit tests passed (one flaky probabilistic test required a re-run)

Which issue(s) this PR fixes:

Fixes #1678

Does this PR introduce a user-facing change?:

NONE


@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/bug Categorizes issue or PR as related to a bug. labels Oct 3, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: KillianGolds
Once this PR has been reviewed and has the lgtm label, please assign kfswain for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

netlify bot commented Oct 3, 2025

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

Name Link
🔨 Latest commit 40cecfd
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/68e3d70126a04a0008ead222
😎 Deploy Preview https://deploy-preview-1679--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.

Copy link

linux-foundation-easycla bot commented Oct 3, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: KillianGolds / name: Killian Golds (40cecfd)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 3, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @KillianGolds!

It looks like this is your first PR to kubernetes-sigs/gateway-api-inference-extension 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api-inference-extension has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@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 Oct 3, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @KillianGolds. 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 cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 3, 2025
@KillianGolds KillianGolds force-pushed the fix-labelselector-validation-markers branch from 893892d to b9b7a12 Compare October 3, 2025 14:12
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 3, 2025
@pierDipi
Copy link
Contributor

pierDipi commented Oct 6, 2025

/cc @nirrozenbaum @kfswain

@pierDipi
Copy link
Contributor

pierDipi commented Oct 6, 2025

/cherry-pick release-1.0

@KillianGolds KillianGolds force-pushed the fix-labelselector-validation-markers branch from b9b7a12 to 68f3f39 Compare October 6, 2025 14:45
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 6, 2025
  Changed MinItems/MaxItems to
  MinProperties/MaxProperties for the
  MatchLabels field in LabelSelector, as it is a map type, not an array.
  This resolves controller-gen CRD generation
  errors.

Signed-off-by: Killian Golds <[email protected]>
@KillianGolds KillianGolds force-pushed the fix-labelselector-validation-markers branch from 68f3f39 to 40cecfd Compare October 6, 2025 14:49
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 6, 2025
KillianGolds added a commit to opendatahub-io/kserve that referenced this pull request Oct 6, 2025
…nifests

Gateway API Inference Extension v1.0.0 has invalid kubebuilder validation
markers (MinItems/MaxItems on a map field) causing controller-gen to fail.
Applied temporary fork workaround pointing to personal fork based on v1.0.0
tag with the fix applied.

Changes:
- Add replace directive in go.mod for GIE fork at kserve-compatibility-v1.0
- Regenerate all CRD manifests with controller-gen v0.17.2
- Regenerate Go code (deepcopy, openapi) and Python SDK
- Fix linting errors in scheduler.go

The fork maintains K8s v0.33.4 compatibility (no version conflicts).
This is a temporary workaround until upstream merges the fix and releases
a patched version.

Upstream issue: kubernetes-sigs/gateway-api-inference-extension#1678
Upstream fix PR: kubernetes-sigs/gateway-api-inference-extension#1679

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: MinItems/MaxItems on map (LabelSelector.MatchLabels) causing CRD gen error.
3 participants