Skip to content

Large CRDs go over size limits (e.g. those with embedded podspecs) #82292

@DirectXMan12

Description

@DirectXMan12

Over in KubeBuilder land, we've started to see issues around very large validation blocks going over size limits. Thus far, it's mainly just been the client-size-apply-induced annotation limit, but I worry that when we start getting multiple versions we might go over the 1M limit. For instance, see kubernetes-sigs/kubebuilder#962, which has single-version 700k CRD, due to the large validation schema.

So far, we've mostly been able to solve the issues by partially or fully truncating the field descriptions, but this seems suboptimal, since you're basically saying "you don't get API docs now".

From what I've seen so far, the issues are usually hit with things like PodSpec (e.g. we hit the client-side-apply annotation limit with our conversion of CronJob in our tutorial when we introduced a new version).

Worst comes to worst, we can add more pruning in controller-tools/kubebuilder, but I was wondering if some folks had better ideas or more discussion upstream.

Refs (#62872) could help alleviate this a bit in the case of multiple podspecs, but don't solve the problem entirely (unless we get cross-object refs, which have previously been rejected).

Increasing the object size avoids the issue we haven't hit yet, but won't solve the client-side-apply annotation limit issue. Practically even though SSA will get here eventually, folks are going to be using pre-SSA kubectls for a while, I expect.

TL;DR: Pod spec validation makes CRDs large, any suggestions?

/sig api-machinery

Metadata

Metadata

Assignees

Labels

area/custom-resourceskind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions