-
Notifications
You must be signed in to change notification settings - Fork 176
Fix LabelSelector validation markers for map field #1679
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
base: main
Are you sure you want to change the base?
Fix LabelSelector validation markers for map field #1679
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: KillianGolds 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 |
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Welcome @KillianGolds! |
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 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. |
893892d
to
b9b7a12
Compare
/cherry-pick release-1.0 |
b9b7a12
to
68f3f39
Compare
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]>
68f3f39
to
40cecfd
Compare
…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
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 toMinProperties/MaxProperties
for theMatchLabels
field inLabelSelector
. SinceMatchLabels
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