Skip to content

🐛 Stop setting invalid formats int32/int64 for integer types#1274

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
sbueringer:pr-drop-invalid-formats
Sep 4, 2025
Merged

🐛 Stop setting invalid formats int32/int64 for integer types#1274
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
sbueringer:pr-drop-invalid-formats

Conversation

@sbueringer
Copy link
Member

Signed-off-by: Stefan Büringer buringerst@vmware.com

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 3, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 3, 2025
@sbueringer sbueringer changed the title 🐛 Stop setting invalid formats int32/int64 for integer types [WIP] 🐛 Stop setting invalid formats int32/int64 for integer types Sep 3, 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 Sep 3, 2025
@sbueringer sbueringer force-pushed the pr-drop-invalid-formats branch from 30fa745 to e59e242 Compare September 3, 2025 17:46
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 3, 2025
@sbueringer sbueringer force-pushed the pr-drop-invalid-formats branch from e59e242 to b432fbb Compare September 3, 2025 18:12
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 3, 2025
Signed-off-by: Stefan Büringer buringerst@vmware.com
@sbueringer sbueringer force-pushed the pr-drop-invalid-formats branch from b432fbb to 02ea9af Compare September 3, 2025 18:15
@sbueringer sbueringer changed the title [WIP] 🐛 Stop setting invalid formats int32/int64 for integer types 🐛 Stop setting invalid formats int32/int64 for integer types Sep 3, 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 Sep 3, 2025
@fabriziopandini
Copy link
Member

change lgtm, thanks for the quick fix!

@sbueringer
Copy link
Member Author

/hold

for review from @JoelSpeed or @alvaroaleman

@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 3, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 3, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, 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:
  • OWNERS [alvaroaleman,sbueringer]

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
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 80ca315f963e0112da81c6c8b2dfe8f08d7efbfe

@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 4, 2025
@k8s-ci-robot k8s-ci-robot merged commit d55abc7 into kubernetes-sigs:main Sep 4, 2025
11 checks passed
@sbueringer sbueringer deleted the pr-drop-invalid-formats branch September 5, 2025 07:54
@sbueringer
Copy link
Member Author

Will be reverted in #1275 (comment)

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