Skip to content

🐛 Revert "Stop setting invalid formats int32/int64 for integer types"#1275

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
sbueringer:pr-revert-int
Sep 5, 2025
Merged

🐛 Revert "Stop setting invalid formats int32/int64 for integer types"#1275
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
sbueringer:pr-revert-int

Conversation

@sbueringer
Copy link
Member

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 5, 2025
@k8s-ci-robot
Copy link
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

Details 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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 5, 2025
@sbueringer
Copy link
Member Author

sbueringer commented Sep 5, 2025

/assign @alvaroaleman @JoelSpeed

/hold
To discuss what we want to do with Uint32 / Uint64. Although this might be better adressed in a separate follow-up, to get main back into a good state ASAP

@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 Sep 5, 2025
@JoelSpeed
Copy link
Contributor

/lgtm

In favour of moving main back to a good state and following up on the uint part

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 5, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 2876472c53c8f6ef4f9c1d593ec756833bade42b

@sbueringer
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 5, 2025
@k8s-ci-robot k8s-ci-robot merged commit 07facf9 into kubernetes-sigs:main Sep 5, 2025
10 checks passed
@sbueringer sbueringer deleted the pr-revert-int branch September 5, 2025 12:39
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>
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants