-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Marker to disable validation #962
Comments
Unfortunately, references aren't supported by the kube extensions API server (which is responsible for serving CRs), and external references are unlikely to ever be supported (internal references may be eventually, though). /priority backlong |
@DirectXMan12: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
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/test-infra repository. |
(this seems reasonable, though) |
I was able to work-around the initial problem (CRD file size) by removing the documentation (rather than the validation) for this resource. This was done using cli arguments. https://github.com/crossplaneio/crossplane/pull/702/files#diff-b67911656ef5d18c4ae36cb6741b7965R99 Similar to this issue, "It should be possible to add a marker comment to a field to set the maxDescLen". If it was possible to set |
longterm, we'd like to make it not an issue (you shouldn't have to choose whether or not your API docs show field documentation), which is why I'm hesitant to set maxDescLen at an object-level |
See also kubernetes/kubernetes#82292 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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/test-infra repository. |
It should be possible to add a marker comment to a field to disable validation, resulting in an empty
spec
in the resultant CRD.I have a type that includes either a
apps.DeploymentSpec
property or abatch.JobSpec
property. In older kubebuilder emitted CRD files, thespec
for this field was simple, onlytype: object
. In kubebuilder2 the CRD explodes in file size as the complete deployment and job specs are included in thespec
.This is primarily a concern due to the CRD yaml size increasing to 700k in my case.
kubectl apply
tries to keep that yaml in an annotation which exceeds the max size of an annotation (relating to #906).Ignoring the
kubectl apply
limitations, it should be possible to omit the details in thespec
block in the resultant CRD yaml (or use an external openapiv3 reference). I assume that a feature to disable validation on this field would result in thespec
block being omitted or simplified in the CRD yaml.Here is the older kubebuilder output for this type:
https://github.com/crossplaneio/crossplane/blob/b6034989dae292c36ecdf20bde714f58fe8ec6cb/cluster/charts/crossplane/crds/extensions/v1alpha1/extension.yaml#L47-L52
And here is the new kubebuilder2 output (same type, but renamed from
extensions
tostacks
):https://github.com/crossplaneio/crossplane/blob/485ea8312614b2ee7736e189f01a2fa78b327b39/cluster/charts/crossplane/crds/stacks.crossplane.io_stacks.yaml#L55-L61
This may relate to #301
/kind feature
The text was updated successfully, but these errors were encountered: