feat(api): restore CRD field descriptions for operator-owned types#5023
Open
Sanil2108 wants to merge 1 commit into
Open
feat(api): restore CRD field descriptions for operator-owned types#5023Sanil2108 wants to merge 1 commit into
Sanil2108 wants to merge 1 commit into
Conversation
Set maxDescLen=128 in CRD generation options to restore field descriptions that were removed in open-telemetry#2703 to keep CRD sizes manageable. Descriptions are now present for all operator-defined types (OpenTelemetryCollector, Instrumentation, TargetAllocator, etc.), making kubectl explain and API documentation more useful. The install Makefile target now uses kubectl apply --server-side to support the larger CRD payloads (~900KB for the collector CRD vs ~400KB without descriptions), which is within etcd object size limits. Fixes: open-telemetry#2737
iblancasa
requested changes
May 4, 2026
Contributor
iblancasa
left a comment
There was a problem hiding this comment.
I'm not against enabling this again but only if we have some kind of test that probes the operator is not broken because of this.
Contributor
|
I'm not sure we want to do this. Or at least not until we drop support for v1alpha1 Collectors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores CRD field descriptions that were removed in #2703 to keep CRD sizes manageable.
maxDescLen=128(previouslymaxDescLen=0) in thecontroller-genCRD generation options, restoring truncated but meaningful descriptions for all operator-defined fieldsmake installtarget to usekubectl apply --server-sideto support the larger CRD payloadsBackground
PR #2703 set
maxDescLen=0becausekubectl apply -f crd-file.yamlwas failing due to CRD size. This removed all field descriptions from the generated CRDs, makingkubectl explainand API documentation less useful.With
maxDescLen=128, the largest CRD (OpenTelemetryCollectors) grows from ~400KB to ~900KB, which is within etcd's object size limits. Using--server-sideapply avoids thelast-applied-configurationannotation that doubles the payload for client-side apply.CRD sizes with this change
Example
Before:
After:
Resolves: #2737
Test plan
make manifestsregenerates CRDs with descriptions presentkubectl explainshows field descriptions for operator-owned types