Documentation
¶
Overview ¶
Command crd-strip-descriptions copies CRD manifests from a source directory to a target directory and removes all schema descriptions from deprecated versions other than the preferred version.
Why: Helm stores each release in a Secret limited to 1 MiB, and most CRDs serve a deprecated version with a full copy of the preferred version's schema. Descriptions are prose that compresses badly, so dropping them from the deprecated copies keeps the operator-crds release well below the limit.
The preferred version is the served version with the highest Kubernetes version priority (v1 > v1beta1 > v1alpha1). It is the version API discovery advertises first and `kubectl explain` shows by default, so it always keeps its descriptions, even when the whole kind is deprecated. Storage does not matter: during a migration the storage version can be an older, deprecated one that users no longer read.
The output is written the way controller-gen v0.17.3 writes CRDs (a "---" header, sorted keys, no status, no creationTimestamp), so everything that is not a removed description comes out byte-identical to the source file.
The source directory (deploy/charts/operator-crds/files/crds) stays the complete source of truth: the release tarball and the API compatibility check read it.