🐛 Revert "Stop setting invalid formats int32/int64 for integer types"#1275
Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom Sep 5, 2025
Merged
Conversation
This reverts commit 02ea9af.
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
Author
|
/assign @alvaroaleman @JoelSpeed /hold |
Contributor
|
/lgtm In favour of moving main back to a good state and following up on the uint part |
Contributor
|
LGTM label has been added. DetailsGit tree hash: 2876472c53c8f6ef4f9c1d593ec756833bade42b |
Member
Author
|
/hold cancel |
7 tasks
opspawn
pushed a commit
to opspawn/kagent
that referenced
this pull request
Feb 27, 2026
Re: EItanya's review — "what do other kube native projects do?" Researched cert-manager, Istio, Crossplane, Argo CD, KEDA, and Knative. None of them strip format: int32/int64 from their CRDs. These are valid OpenAPI 3.0 format values that controller-gen emits based on Go types. The Kubernetes warnings about unrecognized formats were a bug in the apiserver (kubernetes/kubernetes#133880), fixed in v1.34.1+ (kubernetes/kubernetes#133896). The fix restricts format warnings to string-type properties only, since format validation is only semantically meaningful for strings in JSON Schema. The controller-tools maintainers themselves tried removing these format values (kubernetes-sigs/controller-tools#1274) but reverted within 24 hours (kubernetes-sigs/controller-tools#1275) because they are part of the OpenAPI spec. Previous approach in this PR stripped the annotations via sed/perl post-processing. This revision removes all stripping logic and instead adds a brief explanatory comment in the Makefile for future contributors who encounter these warnings on older K8s versions. Signed-off-by: opspawn <agent@opspawn.com>
opspawn
pushed a commit
to opspawn/kagent
that referenced
this pull request
Feb 27, 2026
Re: EItanya's review — "what do other kube native projects do?" Researched cert-manager, Istio, Crossplane, Argo CD, KEDA, and Knative. None of them strip format: int32/int64 from their CRDs. These are valid OpenAPI 3.0 format values that controller-gen emits based on Go types. The Kubernetes warnings about unrecognized formats were a bug in the apiserver (kubernetes/kubernetes#133880), fixed in v1.34.1+ (kubernetes/kubernetes#133896). The fix restricts format warnings to string-type properties only, since format validation is only semantically meaningful for strings in JSON Schema. The controller-tools maintainers themselves tried removing these format values (kubernetes-sigs/controller-tools#1274) but reverted within 24 hours (kubernetes-sigs/controller-tools#1275) because they are part of the OpenAPI spec. Previous approach in this PR stripped the annotations via sed/perl post-processing. This revision removes all stripping logic and instead adds a brief explanatory comment in the Makefile for future contributors who encounter these warnings on older K8s versions. Signed-off-by: opspawn <agent@opspawn.com> Signed-off-by: fl-sean03 <jmhbh@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts commit 02ea9af.
The v1.34.0 kube-apiserver returns
"unrecognized format \"int64\""warnings. We initially thought this was intended and adjusted controller-gen accordingly (#1274)Turns out it was not (kubernetes/kubernetes#133880), so now reverting the previous change.