8000 crd: explain why pod and service template specs are schemaless by Slach · Pull Request #2184 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content

crd: explain why pod and service template specs are schemaless - #2184

Merged
alex-zaitsev merged 1 commit into
0.28.0from
crd-explain-schemaless-templates
Dec 3, 2026
Merged

alex-zaitsev merged 1 commit into
0.28.0from
crd-explain-schemaless-templates

Conversation

@Slach
@Slach Slach commented Dec 3, 2026
Copy link
Copy Markdown
Collaborator

Replaces the # TODO specify PodSpec / ObjectMeta / ServiceSpec comments in the CHI/CHIT and CHK CRD templates with the reason these nodes stay x-kubernetes-preserve-unknown-fields: true. This keeps the next contributor from trying to "fix" the TODO again (see #2084).

  • A structural schema generated from k8s.io/api pins the spec to the operator's API version. The apiserver would then silently prune newer PodSpec/ServiceSpec fields on clusters newer than that version.
  • The full PodSpec schema pushes the CRD past the 256 KB limits for client-side kubectl apply and the Helm CRD ConfigMap.

Only comments changed. The manifests were regenerated with dev/build_manifests.sh, and the Helm CRDs are unaffected because comments are stripped there.

🤖 Generated with Claude Code

Replace "TODO specify PodSpec/ObjectMeta/ServiceSpec" in CHI, CHIT and CHK
with the reason they stay x-kubernetes-preserve-unknown-fields: a structural
schema pins them to the operator's k8s.io/api version, so the apiserver would
silently prune newer fields, and the full PodSpec does not fit the CRD size
limits. See #2084.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alex-zaitsev
alex-zaitsev self-requested a review December 3, 2026 07:29
@alex-zaitsev
alex-zaitsev merged commit bf15602 into 0.28.0 Dec 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0